Options for PrintToPDF HTMLRenderer method

MiServer is Dyalog's APL-based web development framework

Options for PrintToPDF HTMLRenderer method

Postby PGilbert on Thu Aug 13, 2020 2:21 pm

While using the PrintToPDF method of the HTMLRenderer you need to specify a file name where the current screen of the HTMLRenderer will be saved as a pdf file. Should this method be named SaveAsPDF instead since there is no printing involved ?

Also the method is capturing the screen in portrait mode and does not try to fit the screen in it. This is resulting in pdf files that shows a partial capture screen of the original screen when the screen does not fit the portrait mode (our application screen is more landscape ie wider than higher).

Is there a way to specify the 'PrintToPDF' method to go landscape instead of portrait and adjust the scaling so the whole screen is captured ?
User avatar
PGilbert
 
Posts: 440
Joined: Sun Dec 13, 2009 8:46 pm
Location: Montréal, Québec, Canada

Re: Options for PrintToPDF HTMLRenderer method

Postby JohnD|Dyalog on Fri Sep 25, 2020 8:45 am

Hi Pierre,

We called the method PrintToPDF because that's the name of the CEF function that we call documented here: https://magpcss.org/ceforum/apidocs3/projects/(default)/CefBrowserHost.html#PrintToPDF. You'll notice that there is a CefPrintToPdfSettings structure passed to the function. However we don't currently provide a mechanism to set its members. I'll add an RFE to look into that in the future.

Best Regards
John Daintree.
User avatar
JohnD|Dyalog
 
Posts: 74
Joined: Wed Oct 01, 2008 9:35 am


Return to MiServer

Who is online

Users browsing this forum: No registered users and 1 guest