1. Jeong Hwan Jang
  2. PowerBuilder
  3. Thursday, 5 January 2023 09:13 AM UTC

Hi, everyone.

I try to save datawindow to PDF using SAVEAS() method.  (Powerbuilder 2019 R3)

The script is as below,

-------------------------------------------------------------------------------------

dw.Retrieve()

ls_fileName = ".\Attach_File.PDF"

filedelete(ls_fileName)

dw.Saveas(ls_fileName, PDF!, True)

if FileLength(ls_fileName) = 0 then
    messagebox("Warning", "An Error occured. File size is 0.")

    return
end if

------------------------------------------------------------------------------------

It's working well on my developing pc.

But on one of client pc(Windows7 64bit), the PDF file is created and the file size is zero.


Do you have any idea with this problem?

I'm looking forward to your help.

Thanks.

 

Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 5 January 2023 16:56 PM UTC
  2. PowerBuilder
  3. # 1

Hi,

In a previous company I worked for, we were supposed to use Distill!, but that requires a correct installation of GhostScript. Since they weren't able to give the developers a correct installation, we all ended up using NativePDF!, which worked pretty well.

 https://docs.appeon.com/pb2019r2/pbug/ch20s03.html#Saving_as_PDF_using_PDFlib 

Maybe you're experiencing a similar problem?

regards,

MiguelL

Comment
  1. Miguel Leeuwe
  2. Thursday, 5 January 2023 17:04 PM UTC
Read the above mentioned link well. It also states that for Distill! you need to have Administrator rights. I think that NativePDF! is the way to go, though it does have more problems/bugs.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 5 January 2023 19:17 PM UTC
Hi Miguel

FWIW: I have been using GhostScript via the Distill option for decades and never needed to use Admin Rights. In fact, that does not maker sense as the GS driver becomes part of the O/S print divers that are handled buy the O/S itself. Thus, does not require any PB Apps to be run in Admin mode (and never has).

Regards ... Chris
  1. Helpful
  1. Miguel Leeuwe
  2. Thursday, 5 January 2023 19:24 PM UTC
Hi Chris,

From the link I posted I got this information, not sure if it might be wrong:

https://docs.appeon.com/pb2019r2/pbug/ch20s03.html#Saving_as_PDF_using_PDFlib

System requirements for the Distill! method

Users must have administrative privileges to create a PDF file.

regards
  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Thursday, 5 January 2023 16:48 PM UTC
  2. PowerBuilder
  3. # 2

Windows 7 is not a supported OS.  Can you recreate the problem on Windows 10 machine? If you cannot, then most likely it is because you are using incompatible Windows OS version.  https://docs.appeon.com/pb2019r3/release_bulletin_for_pb/system_requirements.html#system_requirements_for_powerbuilder

 

Comment
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Thursday, 5 January 2023 10:49 AM UTC
  2. PowerBuilder
  3. # 3

Hi.

Are you sure this is not a write permission issue? The user running the application has right to write in application folder? By the way, using .\ isn't a safe way to set the path...

Andreas.

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.