Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 877
  • Last Modified:

Need to programmatically convert and merge a .doc and a .tif to .pdf using original Adobe 'writer'

Hi,

there is a scanned file (in TIFF format) and a stored Word document (.DOC). Both files should be merged together into one PDF File using the ADOBE Acrobat Professional 7.0. The conversion must run automatically (on a server) without user input.

I recently tried to achieve that by using ImageMagick but the project requires usage of Acrobat Writer rather than a third-party product.

Regards, Alex
0
itsmeandnobodyelse
Asked:
itsmeandnobodyelse
  • 3
1 Solution
 
itsmeandnobodyelseAuthor Commented:
As far as I evaluated there are a few ways to achieve the above, none of them really comfortable:

1. Usage of ADOBE PDF Library SDK  

The caveat is that - opposite to Acrobat Prof. executable, the PDF library SDK has no filters included which would convert standard filetypes like .doc to PDF. I neither know til now whether it could take a .tif file as input or if I have to use other tools to achieve that. The .doc must be *printed* to a PDF or postscript file using Word automation (what most likely will slow down the process significantly).

2. Usage of  Acrobat Prof. by means of OLE (and DCOM)

With that I could do all conversions required as Acrobat Prof.  has all filters included. But, as there is no C++ wrapper for the interface and I didn't find a good documentation on the OLE interface till now.

3. Using the Javascript interface provided by Adobe

Most likely it doesn't include conversion filters either. And actually I don't think that invoking Javascript from C++ is a senseful solution.

4. Adding a self-written plug-in to Acrobat and invoke it via DCOM

That has some charme as one of the samples Adobe provided with its plug-in support, does pretty much what I need. Unfortunately I neither know how to add a self-written plugin with .api extension to Acrobat Prof.  nor how to call and pass arguments to it using DCOM.  

0
 
jkrCommented:
Any chance you can skip the requirement "Adobe 'writer'"? With GhostScript and some tricks (including MS Office installed on the server), that should be feasible... (not that I would promise anything here right now ;o)
0
 
itsmeandnobodyelseAuthor Commented:
>>>> Any chance you can skip the requirement "Adobe 'writer'"?
No, I had a solution using ImageMagick which converts the tif and takes text. But then, the customer wants to have a .doc instead of plain text and the final should be all input resized to 90 percent into a 'frozen' pdf created by acrobat. The customer is a bank and they need to have it archived untouchable for at least 10 years. They only trust original Adobe software to guarantee that.

Thanks for your answer.

0
 
itsmeandnobodyelseAuthor Commented:
We were currently trying to go alternative 4 (adding a self-written plug-in to Acrobat and invoke it via DCOM). We achieved to build and add the PDFBinder plug-in (by simply copying it into the plug-ins folder) and found a code sample (Code Project) how to invoke a plug-in of Acrobat(MFC and C++). Though our app doesn't use MFC framework we nevertheless can use MFC and next week it will turn out whether we could go that way.

I'll close the question in a few days.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now