Print Page | Close Window

How to increase or decrease the size of a pdf file

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=2625
Printed Date: 30 Jan 26 at 9:10AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: How to increase or decrease the size of a pdf file
Posted By: Alfs
Subject: How to increase or decrease the size of a pdf file
Date 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.



Replies:
Posted By: Ingo
Date 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




Posted By: Alfs
Date Posted: 29 Apr 13 at 7:22PM
Thanks Ingo, but i need PDf format, not a renderPDF.

Thanks again.



Posted By: Ingo
Date 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


Posted By: Alfs
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk