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!
Page dimensions are wrong |
Post Reply |
Author | |
Louis
Team Player Joined: 28 May 10 Location: Paris Status: Offline Points: 19 |
Post Options
Thanks(0)
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
|
|
Louis
Team Player Joined: 28 May 10 Location: Paris Status: Offline Points: 19 |
Post Options
Thanks(0)
|
I'm sending the file by email...
|
|
Louis
Team Player Joined: 28 May 10 Location: Paris Status: Offline Points: 19 |
Post Options
Thanks(0)
|
Sorry, the file is for another topic.
|
|
Louis
Team Player Joined: 28 May 10 Location: Paris Status: Offline Points: 19 |
Post Options
Thanks(0)
|
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
|
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
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 |
|
Louis
Team Player Joined: 28 May 10 Location: Paris Status: Offline Points: 19 |
Post Options
Thanks(0)
|
Could you plan to add this feature (very useful) in QP ?
|
|
Louis
Team Player Joined: 28 May 10 Location: Paris Status: Offline Points: 19 |
Post Options
Thanks(0)
|
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
|
|
Louis
Team Player Joined: 28 May 10 Location: Paris Status: Offline Points: 19 |
Post Options
Thanks(0)
|
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
|
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
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 ;-) |
|
Louis
Team Player Joined: 28 May 10 Location: Paris Status: Offline Points: 19 |
Post Options
Thanks(0)
|
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
|
|
Rowan
Moderator Group Joined: 10 Jan 09 Status: Offline Points: 398 |
Post Options
Thanks(0)
|
> 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.
|
|
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