Print Page | Close Window

Assemble multi PDF files in one Page

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: General Discussion
Forum Description: Discussion board for Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=2578
Printed Date: 26 Nov 24 at 8:29AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Assemble multi PDF files in one Page
Posted By: JMLM
Subject: Assemble multi PDF files in one Page
Date Posted: 26 Mar 13 at 4:23PM
Hello (I new in this forum Clap)
How can I  assemble multi PDF files in one page (one on the top, one in the midlle, and a footer for exemple ) and write text on it ?
Thanks
Jm



Replies:
Posted By: Ingo
Date Posted: 26 Mar 13 at 4:41PM
Hi Jim!
 
We don't have a guid here for things like this.
What you'll need is the functionality to save the single pages as images.
In a second run you should shrink the dimensions of each image with ratio 3.
In a third run you should paste these smaller images three per page on new pages.
In a fourth run you can write on these pages with the drawing functionalities.
More detailed you can read about the functions for the single steps in the developer guide and the reference.
 
Cheers and welcome here,
Ingo
 


Posted By: JMLM
Date Posted: 26 Mar 13 at 6:05PM
I'm on mac : does  RenderDocumentToFile function works ?
I tried it but images are empty.


Posted By: Ingo
Date Posted: 26 Mar 13 at 7:36PM
Yes. It works and it's easy to handle.
Better is RenderDocumentToStream (faster).
If you can post your code here (without key!)
perhaps there's anybody who can correct your
code.
You should be patient 'cause the mac-version
is pretty "fresh" on the market ;-)
Try the guides and search here in the samples-
section with RenderDocumentTo.

Cheers, Ingo


Posted By: JMLM
Date Posted: 26 Mar 13 at 7:49PM
Nice, thanks.


Posted By: JMLM
Date Posted: 27 Mar 13 at 11:50AM
Hi
RenderDocumentToStream is not listed in mac documentation and not listed in Xcode
I tried these lines :  http://www.debenu.com/kb/render-a-pdf-as-an-image-with-an-asymmetrical-dpi/

    [DQPL LoadFromFile:@"/Users/JMLM/Desktop/advil.pdf" :@""] ;

    [DQPL RenderPageToFile:72: 1 : 5:@"/Users/JMLM/Desktop/testImg/test.png"];

    

    // Get the original size of the page

    double OriginalWidth = [DQPL PageWidth];

    double OriginalHeight = [DQPL PageHeight];

    

    // Add a new page

    [DQPL NewPage];

    

    // Work out the asymmetrical scaling

    double NewWidth = OriginalWidth;

    double NewHeight = OriginalHeight * 196 / 204;

    

    // Set the dimensions of the new page

    [DQPL SetPageDimensions :NewWidth : NewHeight];

    

    // Capture the original page (it will be removed

    // from the document automatically)

    int CaptureID = [DQPL CapturePage : 1];

    

    // Set the original to the top-left corner

    [DQPL SetOrigin : 1];

    

    // Draw the captured page onto the new page

    [DQPL DrawCapturedPage :CaptureID: 0: 0: NewWidth: NewHeight];

    

    // Render the page

    [DQPL RenderPageToFile : 2041: 5: @"/Users/JMLM/Desktop/testImg/test-2.png" ];



and I tried these lines :  

int pageCount = [DQPL PageCount];

    [DQPL LoadFromFile:@"/Users/JMLM/Desktop/test.pdf" :@""] ;

    

    [DQPL RenderDocumentToFile:72: 0: pageCount: 5: @"/Users/JMLM/Desktop/testImg/test.png"];


Images are created but all are empty. 



Posted By: Ingo
Date Posted: 27 Mar 13 at 11:57AM
Hi!
 
Please read here about content streams / -groups:
http://www.debenu.com/docs/pdf_library_reference/ContentStreamsAndOptionalContentGroups.php - http://www.debenu.com/docs/pdf_library_reference/ContentStreamsAndOptionalContentGroups.php
Perhaps you should try to "combine the layers" first.
 
Cheers, Ingo



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