1. Ray Kellum
  2. PowerBuilder
  3. Wednesday, 2 September 2020 17:55 PM UTC

Hello All,

I have a "helloworld" app that is saving a DW to a PDF file using PDFlib. It is compiled in 32-bit (for a variety of reasons that can't be changed). It works fine on my Windows 10 laptop and VDI, but fails on Citrix running on 2012R2. 

This is the basic script:

string ls_pathname
integer li_RC
datastore lds_print

ls_pathname = "H:\test_saveas.pdf"

lds_print = create datastore
lds_print.dataobject = "d_employees"

lds_print.Object.DataWindow.Export.PDF.NativePDF.UsePrintSpec = 'Yes'
lds_print.Object.DataWindow.Export.PDF.Method = NativePDF!
lds_print.Object.DataWindow.Export.PDF.NativePDF.PDFStandard = 1

li_RC = lds_print.SaveAs ( ls_pathname, PDF!, FALSE )

destroy lds_print

The value of li_RC is -1 so it's a failure, but I have no idea why. Does PDFlib (PBPDF190.dll) not work on Windows Server 2012R2?

Thanks,

Ray Kellum

Accepted Answer
Olan Knight Accepted Answer Pending Moderation
  1. Thursday, 3 September 2020 20:26 PM UTC
  2. PowerBuilder
  3. # Permalink

Have you got all the required DLLs in the same folder as your EXE?
If not, are they included in the PATH variable of the Windows platform?

Comment
  1. Ray Kellum
  2. Thursday, 3 September 2020 20:58 PM UTC
Olan,

This got me to the answer! Evidently we had some corrupt PB DLLs on the 2012R2 server. I replaced them using the Runtime Packager and it started working. Really embarrassed for not even thinking of that! Hopefully all the hair I pulled out will grow back. Thanks Chris, Mark and Mike for your assistance!

Ray Kellum
  1. Helpful
  1. Olan Knight
  2. Thursday, 3 September 2020 21:42 PM UTC
YAY! I'm glad you resolved the issue!
  1. Helpful
There are no comments made yet.
Mark Lee @Appeon Accepted Answer Pending Moderation
  1. Thursday, 3 September 2020 05:33 AM UTC
  2. PowerBuilder
  3. # 1

Hi Ray,

  1. It seems the issue is related to the permissions on Drive "H". If you save it to another path, will there be the same issue?
  2. Please disable the anti-virus software and the windows firewall and try it again.
  3. If this above info is no help, You can also copy the log.ini file (see the attachment) to the folder (C:\Users\appeon\AppData\Local\Temp\Appeon\NativePDF\Log) to enable the NativePDF log file.

And then you will find that the log file is generated under this folder after you use the NativePDF to export the PDF file.

And you can report this problem to our ticket system:https://www.appeon.com/standardsupport/newbug and please also providing these log files for us for analysis.

Regards,

 

Attachments (1)
Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 2 September 2020 18:16 PM UTC
  2. PowerBuilder
  3. # 2

Hi Ray;

   Does it work on the Citrix machine if run "as Admin"?

Regards ... Chris

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 2 September 2020 19:39 PM UTC
Good idea!
  1. Helpful
  1. Ray Kellum
  2. Wednesday, 2 September 2020 20:38 PM UTC
Unfortunately same error on VirtualBox running Server 2012R2. I also tried on Server 2016 with similar results. The temp folders are not getting created, so I'm assuming the PDF DLL just isn't cooperating. Thank you for the idea, though!
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 2 September 2020 21:11 PM UTC
Could it be a permissions issue on Drive "H" (as per your earlier code snippet)?
  1. Helpful
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Wednesday, 2 September 2020 18:21 PM UTC
  2. PowerBuilder
  3. # 3

what PB version?

check the permissions - try it with a user that has full admin permissions to save any file anywhere to see if that fixes the problem.  i think that the native pdf at least at one time would save a temporary file somewhere, then copy it to the final destination.  

newer PB versions might have changed how that works

Comment
  1. Ray Kellum
  2. Wednesday, 2 September 2020 18:39 PM UTC
Sorry! PowerBuilder 2019R2, Build 2328

I've tested programmatically creating the temp directories (i.e. C:\users\<user>\appdata\Local\Temp\Appeon\NativePDF, etc.) manually and it was successful. I was also able to programmatically write a file to those directories successfully. My login has full access on the Citrix server (I also checked this with the server guys and they confirm).
  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.