Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
![]() |
Howto transform existing pdf landscape2portrait? |
Post Reply
|
| Author | |
Giuseppe
Beginner
Joined: 19 Nov 10 Location: Italy Status: Offline Points: 10 |
Post Options
Thanks(0)
Quote Reply
Topic: Howto transform existing pdf landscape2portrait?Posted: 29 Nov 10 at 10:59AM |
|
I've a pdf file, i want trasform landscape to portrait, can i recognize this problem?
|
|
![]() |
|
Ingo
Moderator Group
Joined: 29 Oct 05 Status: Offline Points: 3530 |
Post Options
Thanks(0)
Quote Reply
Posted: 29 Nov 10 at 11:28AM |
|
Hi!
It's not a problem - If the author used landscape, he wants landscape? Have a look in the online reference guide. There are functions to set and get the document dimensions/-formats. You'll have problems if there are large images. From landscape to portrait you have to capture,... making smaller,... try to fit it on portrait,... not an easy job. Cheers, Ingo |
|
![]() |
|
Vankir
Beginner
Joined: 01 Sep 10 Status: Offline Points: 5 |
Post Options
Thanks(0)
Quote Reply
Posted: 30 Nov 10 at 7:15AM |
|
Hi,
Not sure if it will be helpful for you bit some PDF pages can be rotated and have Rotation attribute in PDF. In this case Adobe Acrobat shows them correctly (it applies rotation when render page as far as I understand). I use following code to Render such pages correctly. long nDPI = _Module.GetDriverSettings()->GetPDFRenderResolution(); double dWidth = GetPDFLibrary()->DAGetPageWidth(m_nPDFFileRef, m_nPDFPageRef); double dHeight = GetPDFLibrary()->DAGetPageHeight(m_nPDFFileRef, m_nPDFPageRef); long nRotation = GetPDFLibrary()->DAPageRotation(m_nPDFFileRef, m_nPDFPageRef); //change height and width if page is rotated if(nRotation == 90 || nRotation == 270) { double dTmp = dWidth; dWidth = dHeight; dHeight = dTmp; } //transform width and height to inches and after that to pixels dWidth = dWidth*nDPI/72; dHeight = dHeight*nDPI/72; Best regards, Kirill |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store