How do I merge a set of PDF pages without in-between spaces?

Q:

I would like to merge several PDF’s to one common PDF. Additionally I don’t want have spaces between the several PDF’s in the common PDF. The common PDF must to be a continuous/fluent file. For example:

File1.pdf File2.pdf

a a

b b

c

d

→ Merged.pdf

a

b //ignore the 3 whitespace lines

a

b

c

d

A:

The PDFNet SDK is indeed able to concatenate two PDFs into one document. Please see the sample code at http://www.pdftron.com/pdfnet/samplecode.html#PDFPage.

You can also use PDFNet to obtain the visible content region on the page (with Page.GetVisibleContentBox()) and can crop the page (i.e. cut off the extra white space) with page.SetCropBox().

You could also do more fancy stuff such as stitch pages together (based on their content boxes) by placing (i.e. imposing) original pages on a new page set (for example see ImpositionTest sample project - http://www.pdftron.com/pdfnet/samplecode.html#Imposition)