1. JOHN THOMAS
  2. PowerBuilder
  3. Tuesday, 7 April 2020 15:03 PM UTC

Hi All  - we are changing this one app to use the SaveAs() function for generating PDF's out of an .sbi + .psr combo, replacing the previous print +3rd party drivers approach. This is much desired as the previously used drivers are no longer available and we're looking for a simpler approach anyway.    The only problem at this point is the the SaveAs chokes (unacceptably long time) saving big report files. Main body of reports saves fine to pdf's.  Wondering if  a) this is the same for anyone else and  b) is there a recommended fix.  We are going to have to switch back to the printer-driver approach if we can't resolve this smoothly (for which I could use a recommended printer driver, or maybe PB19 has a native one that works fine already?).  Thanks in advance. 

Tobias Roth Accepted Answer Pending Moderation
  1. Wednesday, 8 April 2020 09:05 AM UTC
  2. PowerBuilder
  3. # 1
0
Votes
Undo

Hi,

i have created/updated some PDF-problem-tickets a few hours ago:
NativePDF-Saving PNG-Quality
NativePDF-Saving WMF: Spaces filled out
NativePDF-Saving GIF-Transparency is white in PDF-File

I have seen there is a difference in the PDF-sizes for the four different NativeImageFormats (NativePDF implementation)

Maybe this will help you.

Regards Tobi

Comment
Hi Tobias, thanks for the effort. We aren't trying to print any image-type files though, these are formatted .psr files which some designer long ago chose to be able to use Infomaker for an addl type of report output these users would access aside from the pdf's. For these pdf's we need, the .psr's are knitted together with tiny-data .sbi files and end up as the pdf file which we're trying to get out with the SaveAs. Again, if we can't get the SaveAs to decently behave for all possible file sizes we'll have to revert to the print drivers/method. Any input on using whatever native print driver PB19 has would help; I haven't researched that really. Trying do that SaveAs thing hopefully. Thanks.
  1. JOHN THOMAS
  2. Wednesday, 8 April 2020 13:54 PM UTC
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Tuesday, 7 April 2020 16:40 PM UTC
  2. PowerBuilder
  3. # 2
0
Votes
Undo

Greetings, John -

Can you elaborate on what you what you categorize as "big reports"? 50 printed pages? 5,000? A 2MB PDF? 2GB? 4,000 rows? 4,000,000? You might be experiencing "normal" delays, but without a little clearer insight as to your needs and conditions it's very difficult for anyone to gauge.

Regards, John

Comment
Hi John, answers:



415KB .psr file source was the largest so far. Some reports with <2000 pages about 10K in size were choking in some cases.



BTW for Roland also, we cannot uses the SaveAsBlob I'm afraid because the app that uses them cannot open blobs, it's stuck in time for a lot of other reasons than that but that would be one limitation also.
  1. JOHN THOMAS
  2. Tuesday, 7 April 2020 17:02 PM UTC
Once the blob is written to disk with a .PDF file extension, it becomes a .PDF file just like any other.
  1. Roland Smith
  2. Tuesday, 7 April 2020 17:15 PM UTC
There are no comments made yet.
JOHN THOMAS Accepted Answer Pending Moderation
  1. Tuesday, 7 April 2020 16:02 PM UTC
  2. PowerBuilder
  3. # 3
0
Votes
Undo

Hi Roland, answers:

 

 

What version of PowerBuilder are you on?  - trying to test/release PB19, previous/current build-code is PB12.5

What is the previous third party?  - the driver I'm seeing behind the named device is "CUSTPDF Writer"....I thought this may have been "CutePDF" but I don't see that anywhere. Whatever it is, we can't get it anymore and most likely don't want it...the 12.5 code that's using this is running on Windows 2003 (gulp).

Are you using NativePDF?  - yes, in the function params

There is now a function SaveNativePDFToBlob that you can use to generate a PDF blob. You could use the GetFileSaveName function to get the file name and then write the blob out using FileWriteEx.  -- this is very helpful I'm sure and sounds probably like what we need, I'll try and send results.  Thanks much!

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Tuesday, 7 April 2020 15:30 PM UTC
  2. PowerBuilder
  3. # 4
0
Votes
Undo

What version of PowerBuilder are you on?

What is the previous third party?

Are you using NativePDF?

There is now a function SaveNativePDFToBlob that you can use to generate a PDF blob. You could use the GetFileSaveName function to get the file name and then write the blob out using FileWriteEx.

 

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.