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 - Page dimensions are wrong
  FAQ FAQ  Forum Search   Register Register  Login Login

Page dimensions are wrong

 Post Reply Post Reply
Author
Message
Louis View Drop Down
Team Player
Team Player


Joined: 28 May 10
Location: Paris
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote Louis Quote  Post ReplyReply Direct Link To This Post Topic: Page dimensions are wrong
    Posted: 06 Aug 10 at 3:37PM
Hi,
 
With some files, the width and height got with PageWidth and PageHeight are wrong. And the ratio between them is also wrong.
Example : 1244 mm x 899 mm instead of 969 mm x 832 mm
 
Are you aware of this trouble ? How to solve it ?
Thanks for your help.
 
Louis
 
Back to Top
Louis View Drop Down
Team Player
Team Player


Joined: 28 May 10
Location: Paris
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote Louis Quote  Post ReplyReply Direct Link To This Post Posted: 06 Aug 10 at 3:42PM
I'm sending the file by email...
Back to Top
Louis View Drop Down
Team Player
Team Player


Joined: 28 May 10
Location: Paris
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote Louis Quote  Post ReplyReply Direct Link To This Post Posted: 06 Aug 10 at 3:43PM
Sorry, the file is for another topic.
Back to Top
Louis View Drop Down
Team Player
Team Player


Joined: 28 May 10
Location: Paris
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote Louis Quote  Post ReplyReply Direct Link To This Post Posted: 10 Aug 10 at 3:27PM
Hi,
 
I have found why the dimensions may be wrong, compared to the size we get in Adobe :
The QuickPDF dimensions (got with PageHeight and PageWidth) include the margins when the document has been resized. Adobe doesn't.
 
Is there a way to get the margins, or to get the real size of the pages ?
 
Louis
 
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: 11 Aug 10 at 6:20AM
Hi Louis!

Not with QP-functionality.
You can save an decrypted file and then looking directly into the source.
There you'll find these values.

Cheers, Ingo



Edited by Ingo - 11 Aug 10 at 6:21AM
Back to Top
Louis View Drop Down
Team Player
Team Player


Joined: 28 May 10
Location: Paris
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote Louis Quote  Post ReplyReply Direct Link To This Post Posted: 11 Aug 10 at 9:36AM
Could you plan to add this feature (very useful) in QP ?
Back to Top
Louis View Drop Down
Team Player
Team Player


Joined: 28 May 10
Location: Paris
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote Louis Quote  Post ReplyReply Direct Link To This Post Posted: 11 Aug 10 at 1:49PM
Hi again,
 
How to save to an decrypted file and looking into the source ? My files are not encrypted, so the function DecryptFile returns 0.
 
Louis
 
Back to Top
Louis View Drop Down
Team Player
Team Player


Joined: 28 May 10
Location: Paris
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote Louis Quote  Post ReplyReply Direct Link To This Post Posted: 11 Aug 10 at 2:19PM
My last question (decrypted file) is still interesting for me, but I found a simple solution to get the real dimensions of the pages :
The GetPageBox function can return the real height or the real width of the selected page.
So, that's nice. I'll use this function instead of PageHeight and PageWidth.
 
Louis
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: 11 Aug 10 at 2:26PM
Hi!

You can treat the document like normal ascii-code.
Read it into a string with "normal" syntax of your IDE and read the content with POS or something similar.

Thanks for the PageBox-hint ;-)

Cheers, Ingo

BTW: This is a user-user-forum - so your feature-request here won't be succesfully ;-)
 
Back to Top
Louis View Drop Down
Team Player
Team Player


Joined: 28 May 10
Location: Paris
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote Louis Quote  Post ReplyReply Direct Link To This Post Posted: 11 Aug 10 at 2:46PM
Hi,
 
So, that's a hard job ! Pdf files may be very long and complex !!
Anyway, PageBox is more useful.
 
I have a last question about the dmensions : how to resize a page and delete permently the margins or the cropped area ?
 
Louis
Back to Top
Rowan View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 10 Jan 09
Status: Offline
Points: 398
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rowan Quote  Post ReplyReply Direct Link To This Post Posted: 12 Aug 10 at 1:20PM
> I have a last question about the dmensions : how to resize a 
> page and delete permently the margins or the cropped area ?

It's not currently possible to permanently delete the objects that are outside of the cropped area -- however, we're looking at adding support for redacting objects that lay outside a certain area in the future.

As a workaround you could crop the document, update the MediaBox using the dimensions retrieved from the CropBox using the GetPageBox function and then render the PDF to an image and then convert it back to a PDF.

This would ensure that there was no hidden objects anymore, but then you would have a PDF file without any actual text (just an image of text) and no interactive elements (i.e. form fields, annotations, etc). So it's a bit of a hack, but might work for you in some cases.

Cheers,
- Rowan.
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