Jump to content

print htmlmemo


jahlxx

Recommended Posts

Hi.

 

Is possible to print the conten6t of a htmlmemo? I've tested some solutions posted in this forum, but allways print some blank pages.

 

And, is possible to save the content and open later with msword? Or open directly? I've tested copy from htmlmemo, and paste in word, but don't paste the images in the memo.

 

Thanks.

 

 

Link to comment
Share on other sites

Ok.

 

In the unigui demo of htmleditor, I put a button, and set this code, from some topic in the forum:

 

 

procedure TMainForm.UniButton4Click(Sender: TObject);
begin
   UniSession.AddJs(UniHTMLMemo1.jsname+'.iframeEl.dom.contentWindow.print();');
end;

 

when press the button, I print, but get some blank pages, tested with printers, and printing to pdf.

 

 

And for the copy/paste issue, I insert an image in the htmlmemo,  mark the whole content of the memo, copy, open msword, and paste, and only paste the text, not the images.

Link to comment
Share on other sites

Ok.

 

In the unigui demo of htmleditor, I put a button, and set this code, from some topic in the forum:

 

 

procedure TMainForm.UniButton4Click(Sender: TObject);

begin

   UniSession.AddJs(UniHTMLMemo1.jsname+'.iframeEl.dom.contentWindow.print();');

end;

 

when press the button, I print, but get some blank pages, tested with printers, and printing to pdf.

 

 

Hi,

 

I couldn't reproduce this issue.

 

Which browser are you using ?!

 

Best regards,

Link to comment
Share on other sites

And for the copy/paste issue, I insert an image in the htmlmemo,  mark the whole content of the memo, copy, open msword, and paste, and only paste the text, not the images.

 

How ?

 

For this, you need to specify the path completely, including the network address (IP, port)

Link to comment
Share on other sites

I'm using firefox.

 

And for the 2nd. question, is possible to open the content of the memo in word? I'm trying to use html instead of richtext (I use richtext in my vlc apps, but with unigui can't), and trying to find any way to do same, or similar for the end user.

 

Really, the 2nd. question is the important for me.

 

Thanks.

Link to comment
Share on other sites

I've checked with IE, FF and chrome, with the results:

 

UniSession.AddJs(UniHTMLMemo1.jsname+'.iframeEl.dom.contentWindow.print();');

 

 

IE-> dont work. the result of print is like a screenshot

 

FF-> don't work. the result is blank pages

 

Chrome-> works OK

 

Any solution?

 

Thanks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...