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!
How to increase or decrease the size of a pdf file |
Post Reply |
Author | |
Alfs
Beginner Joined: 06 Feb 07 Location: Spain Status: Offline Points: 3 |
Post Options
Thanks(0)
Posted: 29 Apr 13 at 6:05PM |
Hello:
Is possible increase or decrease the size of a pdf page and content maintaining the aspect ratio? Thanks. |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi Alfs!
Yes... That's possible. The easiest way is going through the pages rendering them with different dpi-values to stream (pdf pages to image ) and back (image to pdf pages) to new pdf-pages. var Test_Stream : Tmemorystream; jpg : TJPEGImage; begin // . . . QP := TDebenuPDFLibrary0913.Create; Try // . . . QP.LoadFromFile(Edit1.text, ''); // . . . // here you can deal with the zoom-value to // increase/decrease the image and later the // new pdf-page(s) QP.RenderPageToStream(zoom,1,1,test_stream); // . . . Finally QP.Free; End; // . . . // now use the AddImageFrom-functions ... // ... and draw the image into a new pdf. // . . . Cheers and welcome here, Ingo |
|
Alfs
Beginner Joined: 06 Feb 07 Location: Spain Status: Offline Points: 3 |
Post Options
Thanks(0)
|
Thanks Ingo, but i need PDf format, not a renderPDF.
Thanks again. |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi!
Your first post and then immediately absolute heavy stuff ;-) You have to extract all objects of the page (text, images, ...) resize them all drawing them at last to a new page. If i want it ... I wouldn't do it ... ;-) My render-idea is to avoid all these problems and in the end you have a new pdf... and that counts ;-) Cheers, Ingo |
|
Alfs
Beginner Joined: 06 Feb 07 Location: Spain Status: Offline Points: 3 |
Post Options
Thanks(0)
|
:)))))
Yes, it's heavy stuff. I use the Ghoscript, running it as external program works, but I wanted to use a library of Delphi and thought that maybe QuickPdf library, could do it. The need to maintain the pdf format is by geometry An example would be possible? Thanks again Ingo |
|
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