I've got a file called letterhead.pdf and a file called letter.pdf. I'd like to print each page of letter.pdf superimposed on top of letterhead.pdf. So, I'd like to create a utility that might look have a commandline like this:
PrintOnLetterHead.exe <PdfDocument> <LetterHeadPg1> <LetterheadPgN>.
A call might look like:
PrintOnLetterHead.exe letter.pdf letterhead.pdf letterhead.pdf.
I'd love to be able to "merge" two pdf files, but this is more than what I need. What I'd be very happy with is to "print" the first page letterhead to a PrintDC, then "print" the first page of letter to that PrintDC. The result would be both pages, one on top of the other. I'd then repeat for each page.
Would this be possible with the SDK, or would each page printed to the DC include a pagefeed?
Oh yeah, and I've checked out apps that enable one to include a raster image "watermark" and the like. Doesn't accomplish what I'm looking for. I really need the letterhead to be a pdf.
BTW: any other suggestions to accomplish my task are welcome.
Thanks!
Pete
We use this in conjunction with AVPageViewAcquireMachinePort and other functions to put a "preview" of a composed PDF on top of the input PDF for our composition engine in the Acrobat window. The tricky part, as usual, is in the details (transforming AVRects into the right coordinates, dealing with zoom, etc.), but it does work.
You could do something similar and blit the bits to a print DC instead of a screen DC. Unfortunately I can't give you all the code (trade secrets and whatnot), but I think there's a sample somewhere that we started from.
Dan
Thanks! That's all I needed to decide to get started.
btw: any reason you can think of that no one has created a utility like this? I see some multi-thousand $$ programs that include something like this, but no simple quick-overlay utilities like I am describing...
-pete
Good luck,
Dan
Also, you might want to consider just modifying the PDF file to merge the objects from your letterhead with the letter pages into a new temporary PDF document and printing that. It might be easier than messing around with the print DC.
Okay, that's all.
Dan
So, I'd have to go license the SDK. May be worth it, but maybe not, based on your last post.
I'd prefer not to create a new .pdf if I don't have to. Really just want to print two pages without a printer reset.
I'll look up the PDF library, as I hadn't heard of that.
Thanks again.
-pete
There are no supported Acrobat Reader controls. That is not a part of
the SDK. Most of the SDK requires Acrobat, not the Reader.
Aandi Inston
I should comment on that I think.
You don't license the SDK; however, parts of it are available only to
members of ASN.
The Acrobat SDK automates Acrobat (rarely Reader). So what you license
is not the SDK, but copies of Acrobat.
Aandi Inston
I already own a license for Acrobat 5, and would be willing to buy Acrobat 6.
What I want, as described above, is the ability to produce a stand-alone application that can request Acrobat to print a single page to a MetaFile or Print HDC followed by another page without clearing the first.
Also, what would an end-user of my app be required to license from Adobe?
Thanks,
-pete
The end user would simply need Acrobat too.
Aandi Inston
It's called Pcl2Pdf 5.0 and it takes the PCL file and changes it to a
PDF, but it can also add an overlay.
We're using it to add letterhead overlay to a PDF we have already
generated.
We had to buy the plug in for it called FormsElectric to create the
Overlays
But the plug in is pretty cheap.
Hope this helps
Corey