1. Rick Domogalik
  2. PowerBuilder
  3. Tuesday, 2 July 2019 17:42 PM UTC

Looking for some help with creating a PDF Portfolio.  I have used ghostscript in the past to create single PDF's from powerbuilder.  I have been tasked with creating a program that will allow drag and drop PDF portfolio creation much like you can with the native adobe acrobat program.  I just don't see any functionality to produce anything but native pdfs.  If anyone has some sample code if they have come across this.

 

thanks!

Rick Domogalik Accepted Answer Pending Moderation
  1. Wednesday, 10 July 2019 15:58 PM UTC
  2. PowerBuilder
  3. # 1

Chris, 

I started implementing PDFTK in my application and have run into a weird issue.  The folder paths have a period in the folder name.  I have tried to escape them with quotes around the path, but PDFTK seems to not be able to find the folder path.

This is an example of the string I am sending to the command prompt

pdftk.exe M:\DOCS\216070\216070.1601\PDF\4040641.PDF M:\DOCS\216070\216070.1601\PDF\4040642.XLSX cat output M:\DOCS\216070\test.pdf

Even with quotes it still errors.

 

Any thoughts how to get around this period issue?  I can't rename the folders, they are generated by another program that I cannot alter. 

 

thanks!

 

Rick

Comment
  1. John Fauss
  2. Wednesday, 10 July 2019 18:42 PM UTC
If PDFTK cannot handle a folder name that contains a character (a period) that is valid for a Windows folder name, you may have to resort to copying the PDF's from their source location to a Temp directory, then use the utility to create the portfolio from that temp directory, and finally, delete the PDF copies from the temp folder.. PITA, I know. I would also contact that vendor to suggest they handle proper folder names.

HTH

John
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 11 July 2019 01:22 AM UTC
Hi John;

That is a great workaround suggestion!

Rick: were you using single or double quotes around the arguments?

Regards ... Chris
  1. Helpful
  1. Rick Domogalik
  2. Thursday, 11 July 2019 17:48 PM UTC
It was an error on my part. I did not realize that PDFTK only works with existing PDFs. I thought it would covert word docs during the concatenation. Feeling like a total noob with this project. I have tried to get AMYUNI's PDF converter going to convert any word docs to PDF first, then run them through PDFTK to combine them all together. I have never tried to use PowerBuilder to convert Docs to PDF and am struggling to get that code working.



You wouldn't happen to have any snips of code that do this to give me a pointer in the right direction or some better way to do this.



Thanks.



Rick
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 2 July 2019 22:23 PM UTC
  2. PowerBuilder
  3. # 2

Hi Rick;

  I have built something like this in the past. Here are some 3rd party products that you might want to consider for this project. These all work with PB2017/PB2019 in my recent testing, as follows:

Quick PDF:  https://www.debenu.com/products/development/debenu-pdf-library

Az SDK:  https://www.azsdk.com/pdf-split-merge-activex-dll.html

PDFTK: https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit

HTH

Regards ... Chris

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 3 July 2019 17:45 PM UTC
Hi Rick;

FWIW: I use PDFTK for splicing PDF's. The software is free too! ;-)

The other PDF product links I posted can splice PDF's as well but they charge for them.

Regards ... Chris
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Wednesday, 3 July 2019 20:38 PM UTC
Hi Rick, At this point the engineers are not working on adding "append" feature to the NativePDF. So I can't say when this would be supported.
  1. Helpful
  1. Rick Domogalik
  2. Wednesday, 10 July 2019 16:06 PM UTC
Chris,

I started implementing PDFTK in my application and have run into a weird issue. The folder paths have a period in the folder name. I have tried to escape them with quotes around the path, but PDFTK seems to not be able to find the folder path.

This is an example of the string I am sending to the command prompt

pdftk.exe M:\DOCS\216070\216070.1601\PDF\4040641.PDF M:\DOCS\216070\216070.1601\PDF\4040642.XLSX cat output M:\DOCS\216070\test.pdf

Even with quotes it still errors.





Any thoughts how to get around this period issue? I can't rename the folders, they are generated by another program that I cannot alter.



thanks!



Rick
  1. Helpful
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Tuesday, 2 July 2019 20:43 PM UTC
  2. PowerBuilder
  3. # 3

This was educational; I had no idea what a PDF Portfolio was.
https://helpx.adobe.com/acrobat/using/overview-pdf-portfolios.html

As is the case whenever anyone wants to emulate a commercial product, the FIRST thing you do is see if the company sells API licenses for their product.

In this case the tool y ou want to emulate is Adobe ACROBAT. Thus your starting poiunt is here:
https://www.adobe.com/devnet/acrobat.html


Olan

 

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.