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!
![]() |
Horizontal Thumbnails Look like Portrait |
Post Reply ![]() |
Author | |
CrazyTIm ![]() Team Player ![]() ![]() Joined: 21 Aug 11 Location: Australia Status: Offline Points: 29 |
![]() ![]() ![]() ![]() ![]() Posted: 08 Nov 12 at 7:47AM |
Hi all,
I have a PDF which I am resizing all the pages to A4 while preserving the orientation. After I do this I have noticed the thumbnails are all Portrait, but only on the iPad. In Acrobat on my PC they show as normal. I have tried re-rendering the thumbnails using the code below (VB.NET), but strangely this doesn't work, which makes me think it is a property of the page I have missed when resizing it, not the thumbnail itself:
Does something stand out that would fix this, such as adjusting dimensions of the Media Box, Crop Box, Bleed Box, Trim Box or Art Box? I'm not sure what the difference between these are. Thanks, Jason.
|
|
![]() |
|
CrazyTIm ![]() Team Player ![]() ![]() Joined: 21 Aug 11 Location: Australia Status: Offline Points: 29 |
![]() ![]() ![]() ![]() ![]() |
This is a stack overflow question similar to the problem I am facing, however it is with a different library:
http://stackoverflow.com/questions/11736590/creating-a-thumbnail-from-pdf-using-c-sharp-orientation-is-important
|
|
![]() |
|
CrazyTIm ![]() Team Player ![]() ![]() Joined: 21 Aug 11 Location: Australia Status: Offline Points: 29 |
![]() ![]() ![]() ![]() ![]() |
I think I have figured it out. The issue I am having seems to be a problem with how the iPad renders page thumbnails, that is why they look OK on my PC in Acrobat but not on the iPad.
I have tested for an hour or so, and it seems the native PDF viewer in the iPad renders thumbnails differently than Acrobat *for pages that have been rotated*. More specifically, if a portrait page has been rotated to landscape, the thumbnail on the iPad stays in portrait, but the image on the thumbnail gets white bars at the top and bottom. SO it looks like the iPad uses the dimensions of the PDF page to draw the shape of the thumbnail, and then draws the rotated page inside of that, which is a bit confusing to say the least!
|
|
![]() |
|
CrazyTIm ![]() Team Player ![]() ![]() Joined: 21 Aug 11 Location: Australia Status: Offline Points: 29 |
![]() ![]() ![]() ![]() ![]() |
I have a follow-up question to my problem: To get around this I need to reset the rotation of all pages to 0, and for every page that *was* rotated I need to rebuild a new page in Horizontal layout and draw the content rotated in place. Is this possible using the QuickPDF library? the RenderPageToVariant function seems to render it local to the original coordinates and there is no way to rotate the content. Is this correct?
This all seems to be a very specific problem with the iPad so I'm not too concerned if this can't be done. I'll just have to wait for an IOS update that fixes it :). Thanks, Jason
|
|
![]() |
|
CrazyTIm ![]() Team Player ![]() ![]() Joined: 21 Aug 11 Location: Australia Status: Offline Points: 29 |
![]() ![]() ![]() ![]() ![]() |
You know what? A function SetRenderRotation would be what I'm looking for! ...
|
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Hi Jason!
If you need a new functionality you shouldn't ask here in the user-user-forum. Take the official support-pages. There is a place to post new wanted requirements: http://www.quickpdflibrary.com/support/support-query.php Cheers, Ingo |
|
![]() |
|
AndrewC ![]() Moderator Group ![]() ![]() Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
![]() ![]() ![]() ![]() ![]() |
Jason,
The QP.NormalizePage(0) will reset the page rotation to 0 degrees. QP.LoadFromFile ("rotated.pdf", ""); for i = 1 to QP.PageCount() do begin QP.SelectPage(i); QP.NormalizePage(0); end; QP.SaveToFile("0degrees.pdf"); Andrew.
|
|
![]() |
|
CrazyTIm ![]() Team Player ![]() ![]() Joined: 21 Aug 11 Location: Australia Status: Offline Points: 29 |
![]() ![]() ![]() ![]() ![]() |
Serious! This solved my problem :D, thanks Andrew!
|
|
![]() |
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