September 15, 2021
CFPDF Merge smaller sections into single page
Comments
(0)
September 15, 2021
CFPDF Merge smaller sections into single page
Newbie 1 posts
Followers: 0 people
(0)

I have used CFPDF in the past to merge PDF files without issue.  But now, I have a case where I really want to take a small PDF section and merge multiple of them on the same page.  By default, doing this with CFPDF, I am getting a single PDF document where each section is another page.

Take the example, I have three small template files, “Section1.pdf”, Section2.pdf, and Section3.pdf.  Each one is a PDF that is sized 2″ tall by 8″ wide.  I want to put all three of those PDF templates on a single page PDF.  I saw some reference to someone doing this iText directly when they were trying to do a N-Up display.  The real ultimate goal is to be able to add section1, section 3, then section 5, so where I am only including sections that I need to include in the output document, but each of these sections is not a full page and the project requires it to not just be a small section per page, wasting a lot of blank space since these are documents for printing, and that would waste a lot of space.

I tried playing around with CFDocument, because you can have a CFFORM in there, but you can only have one.  You can not have a CFPDF within a CFDocument that I could figure out.  I can not build the page as an HTML and use CFDocument, because I need the very specific layout in each of the sectionXX.pdf.  I did try to think about a way to export the PDF as an image and try to do it that way, but I am not sure the best way to accomplish that (CFPDF has extract images, but I could not find something that would create an image of a PDF page).

I am open to suggestions

0 Comments
Add Comment