You need to be logged in to view a user's profile.
  1. Louis Arena
  2. PowerBuilder
  3. Monday, 10 December 2018 17:50 PM UTC

I have a problem saving datawindows to PDF but only for the clients.  I am able to save as a PDF in the developer workstation.  When I compile and distribute the code the clients go through the motions but the file is never saved.  I have created the PB.INI file in the folder of the distributed application and PB.INI file contains the following 2 lines.

[Data Window]
NativePDF_Valid=1

When I added the NativePDF_Valid=1 to my developers PB.INI then everything worked fine on my workstation.  According to the help files online the code to created the PDF when using the PDFlib generator this code is supposed to automatically be included in my complied code. 

See this link that contains relevant information.

 

Does anyone know the work around for this?

Thanks

Louis

References
  1. https://www.appeon.com/support/documents/appeon_online_help/pb2017r2/application_techniques/ch33s08.html#XREF_33724_Using_the_PDFlib
Louis Arena Accepted Answer Pending Moderation
  1. Tuesday, 11 December 2018 13:43 PM UTC
  2. PowerBuilder
  3. # 1

Chris, thanks for all the help.

My point about the return code is I know it was giving an error, but there was no additional information regarding why I was getting an error.  I would have liked to have received a pop up stating that XXX.DLL is missing or something.

The way I had to test the DLL was to remote to a computer, which did in fact blow up my PC :).  I got the old Blue Screen of Death and a memory dump when I first ran it with the 64 bit DLL.  Just a fun fact.

I really appreciate the guidance on the PB Packager.  My app is custom for my company, and deploying it really is just a matter of copying it to remote servers, nothing fancy was ever needed.  But I will look into this.

You helped me out a lot.

Thanks

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 11 December 2018 16:41 PM UTC
For sure .. some more detail would be more ideal.



I wonder if adding more RC's to the SaveAs () method would be advantageous ... for example:

-1 - The File was existing write protected. Could not over-write

-2 - The default printer for Distill mode does not support "PostScript"

-3 - The "Sybase DataWindow PS" printer does not exist for GhostScript

-4 - The "PBPDFnnn.DLL" PDF DLL found is not the correct bitness

-5 - The "PBPDFnnn.DLL" PDF DLL was not found

-6 - The GhostScript software cannot be located for Distill mode PDF export

etc



Regards ... Chris
  1. Helpful
There are no comments made yet.
Louis Arena Accepted Answer Pending Moderation
  1. Monday, 10 December 2018 22:48 PM UTC
  2. PowerBuilder
  3. # 2

Chris, Thanks for this.  I installed it and it now works.  But these leads to a few questions and a comment.

1. Why did not I not get an error that I was missing a DLL?

2. Are you aware that there are 2 different PBPDF170.DLL?  One is located in C:\program files (X86)\Appeon\Shared\Powerbuilder.  This file has a size of 5,161KB.  The second one is located in C:\program files (X86)\Appeon\Shared\Powerbuilder\x64 with a size of 6,854KB.  It is important to use the right one or you can watch your computer blow up.

3. I upgraded from PB 11.5 to PB 2017R3.  I did not want to distribute every DLL in the shared folder, only to make copying of the application faster and have a smaller footprint in the computer.  I am now thinking this is not the right approach.  Should I copy over all the DLLs in the shared folder when distributing my application?

Thanks

 

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 11 December 2018 02:24 AM UTC
Hi Louis;

Excellent news ... I am glad that is now working! :-)



To answer your questions:



1) You would have received a -1 RC on the SaveAs ( ) command. Checking your return codes would be prudent here.

2) Yes, you have to be careful on the 32bit run-time vs 64 bit version of the DLLs.

I am pretty sure that your PC won't blow up though - but, your App could! ;-)

3) I would recommend using the PB Packager utility to build an MSI for deployment of the run-time DLL's. Just check off what features your App(s) are using and bitness you want and it will assemble the correct DLL's you need. It also registers a few DLL's as well in the GAC (depending if they are .NET related features). Its pretty foolproof.

You can of course just manually copy the DLLs to the deployment PC. For a complete list of DLLs by feature - type in "Deployment" in the PB Help file and it will take you to that checklist.



HTH

Regards ... Chris

  1. Helpful
There are no comments made yet.
Louis Arena Accepted Answer Pending Moderation
  1. Monday, 10 December 2018 21:37 PM UTC
  2. PowerBuilder
  3. # 3

Version 2017 R3 Build 1858.  I just downloaded and got it running on Thanksgiving.

Comment
  1. Chris Pollach @Appeon
  2. Monday, 10 December 2018 22:04 PM UTC
Excellent for using R3! :-)



However, if the "PBPDF170.dll" DLL is ?missing? from the client machine or access to this DLL because of a bad PATH statement ... your PDF SaveAs ( ) command could fail *silently* ( regardless of the PB.INI setting ).

Hopefully, your application checks the return code of the SaveAs ( ) for a -1 (failure) condition.

  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 10 December 2018 20:51 PM UTC
  2. PowerBuilder
  3. # 4

Hi Louis;

  What version &  build of Appeon PB are you using?

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.