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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Howto transform existing pdf landscape2portrait?
  FAQ FAQ  Forum Search   Register Register  Login Login

Howto transform existing pdf landscape2portrait?

 Post Reply Post Reply
Author
Message
Giuseppe View Drop Down
Beginner
Beginner
Avatar

Joined: 19 Nov 10
Location: Italy
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote Giuseppe Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3530
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Vankir View Drop Down
Beginner
Beginner
Avatar

Joined: 01 Sep 10
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote Vankir Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store