NetTalk Central

Author Topic: Process PDF file after upload  (Read 2007 times)

kingja

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
    • Email
Process PDF file after upload
« on: October 09, 2014, 08:01:22 AM »
I would like to do some post-processing of a PDF file after uploading to a BLOB.  I want to add some JavaScript to the PDF using the QuickPDF library and the PageJavaScriptAction method.  Currently, uploading to the BLOB works very well. 

I wonder if there is a way to intercept the PDF before it is put into the BLOB.  Or perhaps I need to re-create the PDF file from the BLOB, process it with QuickPDF and then put it back into the BLOB.  I need to do this on both the initial insert or on an update, if a new version of the PDF is available.  I'm on NT 8.23, C9.1.11242.

Thanks,

Jeff

kingja

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
    • Email
Re: Process PDF file after upload
« Reply #1 on: October 10, 2014, 07:08:04 PM »
As a follow up, I have been using the Post Insert embed to try and do some post processing of the PDF's.  The app in question is a dll app running under the Host.exe.  I'm using the QuickPDF wrapper from Klarisoft.  I have added the CLAQPL.lib and have the CLAQPL.dll in the dll app folder.  There is also one more dll called DebenuPDFLibrary.dll in the dll app folder. 

I find I must also put these dlls in the host.exe folder or it complains it can't find them.  I find this odd as the Host.exe app has not been compiled with the QuickPDF code added.  Only the dll app has the QuickPDF code added.  I'm still struggling with this.

Jeff

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11193
    • View Profile
Re: Process PDF file after upload
« Reply #2 on: October 20, 2014, 02:28:12 AM »
>> I find I must also put these dlls in the host.exe folder or it complains it can't find them.  I find this odd as the Host.exe app has not been compiled with the QuickPDF code added.  Only the dll app has the QuickPDF code added.  I'm still struggling with this.

the host process is running from the Exe folder, so DLL's being loaded at runtime would likely need to be in the same place. (the actual NetTalk DLL has a specific location, but DLL's dependent on that do not.)

>> Or perhaps I need to re-create the PDF file from the BLOB, process it with QuickPDF and then put it back into the BLOB.

I guess this depends on your PDF library. Does it only operate on a file on the disk, or can it operate on a block of memory?

cheers
Bruce