1. Rob Stevens
  2. PowerBuilder
  3. Monday, 28 August 2023 01:50 AM UTC

Hi

I'm not sure how to request an enhancement to PowerBuilder. I note that 2022 R2 has enhancements for PDF documents. There is no print function though.

Some of our clients prefer to print their documents that our application generates in house. We store the documents (pdfs) as blobs in the database and have a function that extracts to the local directory and then prints (currently using DDE and Adobe Acrobat Reader so that we can tell whether the print succeeds or not). DDE is obviously on the way out and it is a pain when the client upgrades their version of adobe reader.

It would be create if we could create a PDF Document object from the blob in the database and then call a print function to print it (and get a result back from the function that it was successfully put on the print queue).

In addition, I looked at using the WebBrowser object but when you call Print it pops the print dialog. It would be nice if you could call the function and suppress the dialog.

Regards

Rob

Tomas Beran Accepted Answer Pending Moderation
  1. Monday, 28 August 2023 18:56 PM UTC
  2. PowerBuilder
  3. # 1

Hi,

printing PDFs is a complex process because there can be almost everything. Signatures, Active content, 3D, video, Pantone colors, gloss, non-rectangle pages etc. I've never seen an alternative library or solution in general which does it correctly. According to my knowledge there are these options:

1. Print through Shell -Print command  (easy but you can't control the print)

2. Use Adobe Reader OLE object directly (Requires Adobe Reader installed)

3. Use Webbrowse (Internet Explorer OLE which opens Adobe Reader COM) - This is the method I use because it's almost always working regardless to Adobe version. With one exception - Adobe Acrobat Pro mustn't be installed as a default PDF handler because it's OutProc COM and IE is crashing.

4. Use PDFium - the library that Chromium uses for rendering PDF. It's C++ library and just building seems to be painful process

5. Use Pdfium .NET library. Looks great but it's expensive

6. Render PDF to something easily printable aka PNG through ghostscript but there may be licensing issue with distributing gsdll.

7. Rendering PDF to PNG with linux pdftoppm as a server side solution

 

Is there any other method?

Comment
  1. Tomas Beran
  2. Tuesday, 29 August 2023 15:23 PM UTC
Imagemagick is not free if you want to convert from PDF. IM uses Ghostscript so AFPL license may be applied to your product.
  1. Helpful
  1. Rob Stevens
  2. Wednesday, 30 August 2023 03:03 AM UTC
Thanks Tomas

I did some work using the WebBrowser object but there is currently no way to suppress the print dialog that pops up.

I'll have a try with some of the options you've mentioned - and also what Chris has suggested.

Regards

Rob
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 30 August 2023 11:51 AM UTC
Hi Tomas;

Yes, ImageMagicK is FREE. It says so right on the website ....

https://imagemagick.org/index.php

I've been using this product for over a decade. ;-)

Regards ... Chris
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 28 August 2023 12:34 PM UTC
  2. PowerBuilder
  3. # 2

Hi Rob;

  Please open a Support Ticket for the feature you would like or an existing feature that you think requires updating.

https://www.appeon.com/standardsupport/search

   DDE is still working well. The only issue was 64bit DDE in PB2022 that did not work. I opened a support ticket for that & that issue is now fixed in R2.

  For the Print Dialogue always popping up, there is already an enhancement opened up for that issue to allow/suppress that at print() time.   HTH 

Regards ... Chris 

Comment
  1. Rob Stevens
  2. Wednesday, 30 August 2023 02:53 AM UTC
Thanks Chris, the issue we have with DDE at the moment is that everytime Adobe Reader has a main version update we need to go and test to make sure it works and also coordinate updating the DDE config details with when our clients update - not to mention that our clients update reader at various stages which doesn't help. Ideally we'd like to move away from DDE - having the ability to print a pdf object directly from PB would be great. I'll log a support ticket.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.