Solved

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

Posted on 2008-06-10
4
857 Views
Last Modified: 2013-12-04
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
Comment
Question by:itsmeandnobodyelse
  • 3
4 Comments
 
LVL 39

Author Comment

by:itsmeandnobodyelse
Comment Utility
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
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
Comment Utility
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
 
LVL 39

Author Comment

by:itsmeandnobodyelse
Comment Utility
>>>> 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
 
LVL 39

Author Comment

by:itsmeandnobodyelse
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Have you ever come up with a need of emailing only few pages of PDF file to one of yourfriend or colleague, instead of whole Adobe file? If yes, then surely you have face problems in doing that! Read this section as I have suggested multiple solutio…
Inserting page numbers in Portable Document Files not only enhances manageability but also makes them look professional. With numbered pages, the file appears more organized and it becomes easier to search for a particular page. The size and the vol…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now