Page 1 of 1

Options for PrintToPDF HTMLRenderer method

Posted: Thu Aug 13, 2020 2:21 pm
by PGilbert
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 ?

Re: Options for PrintToPDF HTMLRenderer method

Posted: Fri Sep 25, 2020 8:45 am
by JohnD|Dyalog
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.