1. Nageswara Rao Magapu
  2. PowerBuilder
  3. Thursday, 29 October 2020 10:40 AM UTC

Hi Everyone , 

 

We have upgraded our Printer from Adobe PDF to Nitro PDF . We ensured the Nitro settings are same as Adobe PDF .

But post upgrade PowerBuilder is not able to open the generated PDF and Failing with error as shown in screenshot .

 

My understanding is that it is not able to create the OLE object or not able to access the OLE object .Below is the Bold line of code where it is failing .

 

//Convert ps file to pdf file
lole_pdf = Create oleobject
lole_pdf.connectToNewObject("pdfdistiller.pdfdistiller")
lole_pdf.bShowWindow = FALSE
lole_pdf.filetopdf(trim(is_distiller_port),trim(as_client_dir) + trim(as_encrypted_filename)," ")
Destroy lole_pdf

Attachments (1)
John Fauss Accepted Answer Pending Moderation
  1. Thursday, 29 October 2020 18:37 PM UTC
  2. PowerBuilder
  3. # 1

Greetings, Nageswara -

I could be mistaken (wouldn't be the first time and most definitely won't be the last, either), but this sounds to me more like an issue with the OLE container that PB hooks into via OLE to display PDF's than a PB issue. Your PDF Browser Control may be old.

For example, on my PC I have a relatively recent install of Acrobat Reader DC, and the PDF Browser Control that it publishes on my system (located in C:\Program File (x86)\Common Files\Adobe\Acrobat\ActiveX\AcroPDFImpl.dll) is product version 20.12.20041.394260, Copyright 1984-2020.

You can find out the location of the ActiveX control on your system from within PB by inserting an OLE control in a window, then in the Insert Object dialog window, select the Insert Control tab and highlight the control type (my system lists "Adobe Acrobat DC Browser Control" and "Adobe PDF Reader". Highlight one, then click the Browse... button to see the OLE Object Browser window. In this window, the InprocServer32 entry under "Class Information" will show you the file path. In Windows Explorer, right-click on this file and select the Details tab to see the product version.

If your PDF browser ActiveX control is outdated, it maybe cannot support the compatibility level that NitroPDF is creating. What PDF compatibility level is NitroPDF creating? I'm not familiar with this product. Can you configure NitroPDF to generate an earlier level?

John

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 29 October 2020 16:02 PM UTC
  2. PowerBuilder
  3. # 2

Hi Nageswara;

  I use both Nitro and PrimoPDF printer drivers for PDF generation on my test PC's. They are basically just PostScript enabled print drivers. All your PB Apps need to do is set the DataWindow to use either of these printers using the PrintSetPrinter() command, set the DWO export mode to "Distill" and and then execute either SaveAs() command or use the DC/DS Print() command and direct the output to the Nitro/Primo PDF based printer. Basically, the similar to using the older GhostScript approach.

Regards ... Chris

Comment
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.