Print Page | Close Window

MergeFileList with different orientations

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=2314
Printed Date: 04 Apr 26 at 4:48AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: MergeFileList with different orientations
Posted By: SteveB
Subject: MergeFileList with different orientations
Date Posted: 22 Jun 12 at 11:16AM
Hello, I'm using Version 8.16 and want to merge some PDF's together. They have different orientations, the first is landscape, the second is portrait, both A4. MergeFileList creates a PDF in A4 portrait, the first document is printed only the left side (information fitting on A4 portrait). Can I change this behaviour, and how ?



Replies:
Posted By: Ingo
Date Posted: 22 Jun 12 at 12:29PM
Hi Steve!

If you change the order the result will be different but still not okay ;-)
I didn't make this experiences with earlier versions and i won't expect such problems now.
An idea: Perhaps the landscape-pdf was a portrait-pdf first and then rotated to landscape?
So internally it's still managed as portrait and for displaying it will be turned.
If i'm right you can check the rotation first before merging.
An easy but ugly way to avoid the problems could be to set the dimensions first to 852 x 852 ;-)
Hope i could give you some ideas...

Cheers  and welcome here,
Ingo



Posted By: AndrewC
Date Posted: 23 Jun 12 at 8:50AM
The following code should solve the problem.  PrintOptions(1,1.. turns on AutoFit and AutoRotate for printing.

Andrew.

            QP.LoadFromFile("271227000001.PDF", "");

            for (int i = 1; i <= QP.PageCount(); i++)
            {
                QP.SelectPage(i);
                QP.NormalizePage(0);
            }

            int iPrintOptions = QP.PrintOptions(1, 1, "Printing Sample");
            QP.PrintDocument(QP.GetDefaultPrinterName(), 1, QP.PageCount(), iPrintOptions);




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