Print Page | Close Window

Imposing PDF

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=2126
Printed Date: 16 Oct 25 at 9:39PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Imposing PDF
Posted By: Barnabe42
Subject: Imposing PDF
Date Posted: 01 Feb 12 at 10:43AM
Hello,
 
I am looking for a way to impose several PDFs into a bigger one.
I have customer having files in A4 and A3 format and they would like to merge them into one A0 file.
 
Is it possible to acheive using Quick PDF ?
 
/Eric
 
 



Replies:
Posted By: AndrewC
Date Posted: 01 Feb 12 at 12:34PM

Yes.  Basically you need to used the CapturePage and DrawCapturedPage functions.

Here is the basic logic that you would need to follow.

1. Create a blank A0 sized page.

  QP.NewDocument();
  QP.SetPageSize("A0");
  QP.SaveToFile("A0.pdf");

2. Merge all the required PDF's into a single PDF.

  QP.ClearFileList("MergeList");
  QP.AddToFileList"(MergeList", "a0.pdf");
  QP.AddToFileList("MergeList", "page1.pdf");
  QP.AddToFileList("MergeList", "page2.pdf");
  QP.AddToFileList("MergeList", "page3.pdf");

  QP.MergeFileList("MergeList", "merged.pdf");

  QP.LoadFormFile("merged.pdf", "");
  
   for (int i=1; i<=3 ; i++)  // QP.PageCount - 1 ???
  {
    QP.SelectPage(2);
    double wid = QP.PageWidth();
    double hgt  = QP.PageHeight();

    int capId = QP.CapturePage(2);   // Page 2 is capture and also deleted from the document.

    QP.SelectPage(1);
    QP.DrawCapturedPage(capId, i * 300, i * 300, wid, hgt);
  }

  QP.SaveToFile("imposed.pdf");



Posted By: Barnabe42
Date Posted: 02 Feb 12 at 1:46PM
Thanks a lot, I was able to impose 3 pdfs into a single A0 pdf.





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