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 - Horizontal Thumbnails Look like Portrait
  FAQ FAQ  Forum Search   Register Register  Login Login

Horizontal Thumbnails Look like Portrait

 Post Reply Post Reply
Author
Message
CrazyTIm View Drop Down
Team Player
Team Player
Avatar

Joined: 21 Aug 11
Location: Australia
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote CrazyTIm Quote  Post ReplyReply Direct Link To This Post Topic: Horizontal Thumbnails Look like Portrait
    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:
' update page thumbnails
For i = 1 To Q.PageCount
    Dim ImageContent = Q.RenderPageToVariant(96, i, 0)
    Dim ImageID As Integer = Q.AddImageFromVariant(ImageContent, 1)
    Q.SelectImage(ImageID)
    Q.SelectPage(i)
    Q.SetPageThumbnail()
Next

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.
Back to Top
CrazyTIm View Drop Down
Team Player
Team Player
Avatar

Joined: 21 Aug 11
Location: Australia
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote CrazyTIm Quote  Post ReplyReply Direct Link To This Post Posted: 08 Nov 12 at 7:51AM
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
Back to Top
CrazyTIm View Drop Down
Team Player
Team Player
Avatar

Joined: 21 Aug 11
Location: Australia
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote CrazyTIm Quote  Post ReplyReply Direct Link To This Post Posted: 09 Nov 12 at 1:36AM
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!
Back to Top
CrazyTIm View Drop Down
Team Player
Team Player
Avatar

Joined: 21 Aug 11
Location: Australia
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote CrazyTIm Quote  Post ReplyReply Direct Link To This Post Posted: 09 Nov 12 at 1:45AM
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
Back to Top
CrazyTIm View Drop Down
Team Player
Team Player
Avatar

Joined: 21 Aug 11
Location: Australia
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote CrazyTIm Quote  Post ReplyReply Direct Link To This Post Posted: 09 Nov 12 at 1:47AM
You know what? A function SetRenderRotation would be what I'm looking for! ...
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 09 Nov 12 at 7:00AM
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
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 09 Nov 12 at 10:58AM
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.
Back to Top
CrazyTIm View Drop Down
Team Player
Team Player
Avatar

Joined: 21 Aug 11
Location: Australia
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote CrazyTIm Quote  Post ReplyReply Direct Link To This Post Posted: 11 Nov 12 at 11:06PM
Serious! This solved my problem :D,  thanks Andrew!
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