CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

PDFViewer

by gbh100 » 26 Nov 2015 03:11

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.
gbh100
 
Posts: 80
Joined: 30 Dec 2014 17:13
Location: Canada

by Alexander Bulei » 26 Nov 2015 12:27

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.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by gbh100 » 26 Nov 2015 14:40

Thanks, it sounds like that will solve my concerns.
gbh100
 
Posts: 80
Joined: 30 Dec 2014 17:13
Location: Canada

by zsleo » 27 Nov 2015 03:58

will the Print method allow options for:
- printing without printer selection popup
- printing with printer selection popup
- print to a specific /defined printer
zsleo
 
Posts: 776
Joined: 03 Feb 2013 03:33

by Alexander Bulei » 27 Nov 2015 10:21

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.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by gbh100 » 30 Nov 2015 16:44

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.
gbh100
 
Posts: 80
Joined: 30 Dec 2014 17:13
Location: Canada

by Alexander Bulei » 30 Nov 2015 17:47

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.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by gbh100 » 16 Jan 2016 03:12

Any chance of getting an OnReady event??
gbh100
 
Posts: 80
Joined: 30 Dec 2014 17:13
Location: Canada

by gbh100 » 25 Mar 2019 16:25

Has there been any advancement with the OnReady event? Or any other way to send a PDF to the browser for printing directly?
gbh100
 
Posts: 80
Joined: 30 Dec 2014 17:13
Location: Canada

by Alexander Bulei » 27 Mar 2019 15:49

Hi gbh100,

Will be available in next beta build.

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

Next

Return to General

Who is online

Users browsing this forum: No registered users and 69 guests

Contact Us.