1. Robert Choi
  2. PowerBuilder
  3. Friday, 3 August 2018 21:32 PM UTC

In the newest version of Powerbuilder 2017, is there a way of importing/inserting .pdf files into a datawindow?  

Currently, I know images/pictures can be inserted into a datawindow, but not .pdf files.

The issue we are having with image files is that the files are too large requiring more memory from the printers (causing it to print extremely slowly) and the images coming out pixelated from converting the .pdf file to an image file format.

 

Thanks.

Mark Lee @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 7 August 2018 08:27 AM UTC
  2. PowerBuilder
  3. # 1

Hi Robert,

 

PB 2017 R3 doesn’t have any enhancement in this area.

One way to do this is to create an OLE object and associated it with an external control to display PDF file on the current DataWindow.

 

However, PB 20417 R3 has this new method:

SaveNativePDFToBlob

It makes it easier to save the displaying content on an DataWindow into a blob variable.

See this link for more details:

https://www.appeon.com/support/documents/appeon_online_help/pb2017r3/datawindow_reference/ch09s135.html

 

Regards,

Mark Lee

 

 

Comment
There are no comments made yet.
Kevin Ridley Accepted Answer Pending Moderation
  1. Tuesday, 7 August 2018 12:34 PM UTC
  2. PowerBuilder
  3. # 2

I would like to find out some more info to know what the full requirement is. 

Does the data originally come from a PB dw saved as pdf or is it a pdf file/data created by another process?

Does it have to be a pdf, or are you just looking for a snapshot of data that you can display in a dw?

Is this pdf stored in the db or as a file?

 

Without knowing the answer to those questions, it's tough to give an answer but I'll try.  First off, there are many options if you are just looking to store and display/print "snapshot in time" data.  You can save a dw as a PSR report or a dw blob using GetFullState().  Then display the psr or retrieve the blob and use SetFullState() to put it back in a dw.  If it has to be a pdf or your process did not create the pdf, then just open a pdf reader to display/print.  You can also optionally use an OLE custom control (Active X) on a window.  Click on the arrow to insert a control, just like you would add a dw or command button, and select the ole custom control.  You will see a dialogue to select the type.  Pick Adobe Acrobat Document.  That control will allow you to display your pdf.

 

HTH,

Kevin

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 8 August 2018 01:38 AM UTC
  2. PowerBuilder
  3. # 3

Hi Robert;

   The DWO in PB 2017 does not support the PDF file format. It would great (IMHO) if the PDF binaries were supported under the DW's TABLE BLOB Controls feature added in PB version 12.5.x.  Unfortunately, the TableBlobs feature currently only supports images and ink blob data and not PDF. This would make a great and practical enhancement to the DWO though IMHO. Feel free to open a Support Ticket on this aspect and request an enhancement for PDF support in the TableBlobs feature.

  For overly large image files, I have used the ImageMagicK open source product to massage the images into smaller sizes or alternative image formats that are much more efficient to handle memory wise.

  Note that ImageMagicK can also convert PDF files into displayable images which could then easily be displayed by DWO's. FYI:   https://www.imagemagick.org/discourse-server/viewtopic.php?t=31328

Food for thought.

HTH

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.