Page 1 of 2

PDFViewer

PostPosted: 26 Nov 2015 03:11
by gbh100
I am trying to use the PDFViewer to create better printed output than I can do from HTML but I am running into a few issues.

1. Is there a way to call the print event in the PDFViewer without requiring the user to press the print button?

2. In the print event is there a way to control the print parameters from the browser?

3. Is there an event that occurs after the print event that would allow me to remove the PDFViewer from the screen?


In general is there another method to produce printed output automatically that might be a better solution? I was trying to use JQPrint but found it hard to control output and add graphics etc.

Re: PDFViewer

PostPosted: 26 Nov 2015 12:27
by Alexander Bulei
Hi gbh100,

ATM there is no methods nor events...
We have implemented in next beta build:

Code: Select all
IWCGJQPDFViewer
- Added: 2 events OnBeforePrint & OnAfterPrint
- Added: 4 methods - Print, Download, FirstPage & LastPage
- Added: property Cache


Best Regards.

Re: PDFViewer

PostPosted: 26 Nov 2015 14:40
by gbh100
Thanks, it sounds like that will solve my concerns.

Re: PDFViewer

PostPosted: 27 Nov 2015 03:58
by zsleo
will the Print method allow options for:
- printing without printer selection popup
- printing with printer selection popup
- print to a specific /defined printer

Re: PDFViewer

PostPosted: 27 Nov 2015 10:21
by Alexander Bulei
Hi zsleo,

will the Print method allow options for:
- printing without printer selection popup
- printing with printer selection popup
- print to a specific /defined printer


Unfortunately, no.
The print dialog is built-in preference of browser, which is configurable on browser settings only.

Javascript doesn't have access.

Best Regards.

Re: PDFViewer

PostPosted: 30 Nov 2015 16:44
by gbh100
I have upgraded to the newest (.164) version to try the print method. I call the print method at the same point that I previously made the PDFViewer visible and nothing happens. Is there any other setup required? I'm using Chrome as the browser.

Re: PDFViewer

PostPosted: 30 Nov 2015 17:47
by Alexander Bulei
Hi gbh100,

You can't call the print method right after the initialization in delphi. In other words, in same event.
I'm looking for possibility to implement OnReady event for this and others circumstances.

Best Regards.

Re: PDFViewer

PostPosted: 16 Jan 2016 03:12
by gbh100
Any chance of getting an OnReady event??

Re: PDFViewer

PostPosted: 25 Mar 2019 16:25
by gbh100
Has there been any advancement with the OnReady event? Or any other way to send a PDF to the browser for printing directly?

Re: PDFViewer

PostPosted: 27 Mar 2019 15:49
by Alexander Bulei
Hi gbh100,

Will be available in next beta build.

Best Regards.