Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Wed Aug 15, 2018 2:29 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Can't print HTMLViewer with built in methods or MBS.. tips?
PostPosted: Wed May 08, 2013 8:01 pm 
Offline

Joined: Wed Feb 13, 2013 10:02 pm
Posts: 10
I've been racking my brain on this for several weeks now... hopefully someone can help. What I need to do SHOULD be incredibly simple. I am compiling for Mac OS X.

I just need to print an HTMLViewer without requiring the user to interact with a print dialog box. The built-in HTMLViewer.print requires the print dialog to be shown and dismissed by the user - it also has bugs with properly printing multiple pages. I just need the HTMLViewer to be sent to the printer automatically, as there may be many HTMLViewer pages being printed.

Using MBS to print the HTMLViewer just prints a blank page, so that doesn't work.

I tried using RenderDocumentToPDFMBS to take an HTMLViewer and convert it to a PDF and then print that. The issue I have is that when I try to print the PDF, it does not print on multiple pages as it should, but rather scaled down so tiny that the print out is useless. The text is unreadable and all of the content is super tiny. I've tried messing with all of my printer settings, there's just no way to have it split the PDF into pages, I've tried using Terminal's lp commands, but no matter what the PDF is scaled down or cut off.

Is there any way to take an HTMLViewer and print the content, with proper scaling and multiple pages, and without showing the print dialog to the user?

Is there a way to simply tell RenderDocumentToPDFMBS to separate by pages? Or is there another method to print from an HTMLViewer without requiring the user interact with the print dialog window each time?

I can't believe this simple task is so difficult, and I'm sure I'm overlooking a simple solution. Thank you very much in advance to anyone who can help.


Top
 Profile  
Reply with quote  
 Post subject: Re: Can't print HTMLViewer with built in methods or MBS.. ti
PostPosted: Sat May 11, 2013 4:23 pm 
Offline
User avatar

Joined: Wed May 10, 2006 2:42 pm
Posts: 2985
Location: Germany
I think what you want is the PrintToPDFFileMBS function:

PrintToPDFFileMBS(PDFFile as folderitem, LeftMargin as double = 50.0, TopMargin as double = 50.0, RightMargin as double = 50.0, BottomMargin as double = 50.0) as boolean

Greetings
Christian

_________________
See you in Orlando, Florida for Real World 2013
More details and registration here:
http://www.realsoftware.com/community/realworld.php


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group