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 - How to increase or decrease the size of a pdf file
  FAQ FAQ  Forum Search   Register Register  Login Login

How to increase or decrease the size of a pdf file

 Post Reply Post Reply
Author
Message
Alfs View Drop Down
Beginner
Beginner
Avatar

Joined: 06 Feb 07
Location: Spain
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote Alfs Quote  Post ReplyReply Direct Link To This Post Topic: How to increase or decrease the size of a pdf file
    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.
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: 29 Apr 13 at 7:14PM
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


Back to Top
Alfs View Drop Down
Beginner
Beginner
Avatar

Joined: 06 Feb 07
Location: Spain
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote Alfs Quote  Post ReplyReply Direct Link To This Post Posted: 29 Apr 13 at 7:22PM
Thanks Ingo, but i need PDf format, not a renderPDF.

Thanks again.

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: 29 Apr 13 at 7:41PM
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
Back to Top
Alfs View Drop Down
Beginner
Beginner
Avatar

Joined: 06 Feb 07
Location: Spain
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote Alfs Quote  Post ReplyReply Direct Link To This Post Posted: 29 Apr 13 at 7:53PM
:)))))

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
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