Planet PDF Forum Archive

Planet PDF ForumWowsers! This is page is old, head to the LIVE Planet PDF Forum. It features more than 10 conferences, covering everything from beginner to in-depth developer and pre-press discussions. If you wish to continue... one & two archive covers 1999-2011 (160,000 pages).


New Forum | Previous | Next | (P-PDF) Developers


Topic: Merging PDF files
Conf: (P-PDF) Developers, Msg: 39831
From: LKM
Date: 5/7/2002 02:30 AM

First of all, what I'm trying to achieve: We need a small program that merges two PDF files in such a way that the first page of the new file contains all objects from both input file, e.g. we overlay or stamp them onto each other. We don't want to append files to each other. I have found some programs that append PDF files to each other, but none that overlays them. So if you know such a program, please tell me as it will make the rest of this question pointless.

Since we haven't found such a beast, we have decided to try to program a prototype that does such a thing, and it's my task to implement it. I'm new to PDF, and I've run into some problems.

First of all, how do I validate a PDF file? How do I find out what's wrong if it's not working? Acrobat Reader isn't very helpful, most of the time it just tells me that it can't open the file. Is there some PDF-debugger? How did you debug your PDF creation programs?

Second, a specific problem:
One of the files has a page object that looks like this:

7 0 obj <<
/Type /Page
/Contents [ 51 0 R 8 0 R ]
/Resources <<
/Type /ExtGState
/SA true
/OP false
/HT 18 0 R
>>

Now I need to put a font resource into that object. I've tried doing it like that:

7 0 obj <<
/Type /Page
/Contents [ 51 0 R 8 0 R ]
/Resources <<
/Font << /F1 53 0 R >>
/Type /ExtGState
/SA true
/OP false
/HT 18 0 R
>>

but that doesn't seem to work. Why does /ExtGState have a /Type? Why are there /SA, /OP and /HT attributes? They aren't really part of /Resources, it seems, but of /ExtGState, but I don't quite understand the way this works, and Adobe's PDF Reference isn't very helpful as this particular case is not mentioned. Adobe's example shows all attribues as dictionaries, but in this case, /ExtGState doesn't seem to be a dictionary.

As you can see, I'm really having some trouble, and any help would be greatly appreciated!

Thanks,

Lucas

PDF In-Depth Free Product Trials Ubiquitous PDF

Debenu Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link...

Download free demo

Debenu PDF Tools Pro

It's simple to use and will let you preview and edit PDF files, it's a Windows application that makes...

Download free demo

Back to the past, 15 years ago! Open Publish 2002

Looking back to 2002, it's amazing how much of the prediction became a reality. Take a read and see what you think!

September 14, 2017
Platinum Sponsor





Search Planet PDF
more searching options...
Planet PDF Newsletter
Most Popular Articles
Featured Product

Debenu PDF Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link control. Take Acrobat to the next level.

Features

Adding a PDF Stamp Comment

OK, so you want to stamp your document. Maybe you need to give reviewers some advice about the document's status or sensitivity. This tip from author Ted Padova demonstrates how to add stamps with the Stamp Tool along with related comments.