Print Page | Close Window

Merging PDFs without a page break

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=4033
Printed Date: 18 May 24 at 12:09PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Merging PDFs without a page break
Posted By: NickW
Subject: Merging PDFs without a page break
Date Posted: 09 Jan 24 at 3:38AM
Hi all,

I'm using the Debenu DLL, v13.

I'm building a contract document comprising (i) a table that will be generated at runtime and (ii) several chunks of static content (footer, terms&conditions page, signatures section etc). The table starts halfway down the first page - it varies in size and may or may not fit on a single page, so I need precise control over positioning and page breaks so that I can lay the document out in a particular way no matter how big or small the table is, keeping certain static sections together and keeping others on separate pages. 

I have separated the static content out into several PDFs, each one being a one-page document only a few lines long. They use multiple colours, rotated text, tables with merged cells etc so I prefer to add them to the contract document by loading them in from disc rather than creating them programmatically, purely because - I thought - it's easier. In each case, I want to load everything that is in the PDF. My plan was to read in the first couple of static sections, append the table and then append the remaining sections after the table before writing the whole thing out to disc. 

I have tried the MergeDocument and MergeFiles APIs, but I find that they insert a page break between each merged file. What is the easiest way to grab content from PDFs without Debenu putting a page break after each one? Here's an example of each approach minus the table code, in the Progress / OpenEdge 4GL (my functions map onto the equivalent 'DPL' functions in the DLL):
  
  // Using MergeDocument 
  SelectDocument(iSafDocument).
  MergeDocument(ip1Body).
  MergeDocument(iSignatures).
  MergeDocument(iFooter).
  NewPage().
  MergeDocument(iTAndC). 

  // Using MergeFiles
  MergeFiles('header.pdf', 'p1Body.pdf', 'merged.pdf').


TIA
Nick



Replies:
Posted By: NickW
Date Posted: 10 Jan 24 at 5:14AM
Found this: https://www.debenu.com/kb/programmatically-stamp-a-pdf-onto-another-pdf/

Assuming this is still the best way to do what I want...



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk