Print Page | Close Window

Page Orientation/MergeFileFast

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=4004
Printed Date: 19 Apr 24 at 1:56AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Page Orientation/MergeFileFast
Posted By: BobW
Subject: Page Orientation/MergeFileFast
Date Posted: 16 Mar 23 at 8:02PM
I have a 4-page PDF where the first 3 pages are Portrait and the last page is Landscape.  I need to merge it as the cover letter with a group of other PDFs.  When I use MergeFileListFast it converts the Landscape page to Portrait.  Is there a way to preserve page orientation when merging files?

Thanks,

Bob



Replies:
Posted By: Ingo
Date Posted: 03 Apr 23 at 10:18PM
Hi Bob :)

Normally the merged files keep the original layout.
I think your files were created as original in A4 portrait AND THEN rotated.
The merge process will merge with the original layout.

To avoid this behavior you can try before merge a NormalizePage and CombineContentStreams on each file.

Another approach could be:
With SelectPage before merging and then...
PageRotation you'll get the rotation of the selected pages.
Then you can do the merge.
Then you can use again SelectPage on the new merged file and with...
RotatePage you can rotate the pages to the original orientation.

HTH

Would like to read about your further experiences with this issue...




-------------
Cheers,
Ingo



Posted By: BobW
Date Posted: 17 Apr 23 at 11:15PM
The problem was solved by having the customer redo the offending page in portrait.  The content fit just fine without modifying it so it was a simple fix.  The document was created in Word and saved as a PDF.

That original PDF displayed correctly in Acrobat and Reader.  When I selected each page and displayed the height and width they were correct for each page, so Quick PDF knows the last page of the cover letter is landscape,

I tried several approaches to solving the issue on my side like using NormalizePage and CombineContentStreams without any change in the results.     I also tried using SetPageBox but that didn't work either.  None of these would be true solutions since they would require me to know which page has an issue and solve it for that file.  If I supply a customer with an app that allows them to select the cover page, I have no way to know which pages require fixing.

Maybe I am doing something wrong, but since I have a cover letter that works, I'm not going to spend any more time on the problem.


Bob



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