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 resample pdf images to compress pdf size?
  FAQ FAQ  Forum Search   Register Register  Login Login

How to resample pdf images to compress pdf size?

 Post Reply Post Reply
Author
Message
ExchangeViews View Drop Down
Team Player
Team Player
Avatar

Joined: 13 Mar 12
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote ExchangeViews Quote  Post ReplyReply Direct Link To This Post Topic: How to resample pdf images to compress pdf size?
    Posted: 28 May 13 at 8:24AM
How to resample pdf images to compress pdf size? I extracted one by one image on disk, downsize the quality of JPG using image processing library then replaces the existing image with new one. After that, the file size get increased instead of going to down. Please assist the best way to reduce file size by downsizing the image quality.

Thanks in advance.Clap
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 29 May 13 at 2:03PM
We would need to see your code and the PDF to understand what could be happening.

Andrew.
Back to Top
ExchangeViews View Drop Down
Team Player
Team Player
Avatar

Joined: 13 Mar 12
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote ExchangeViews Quote  Post ReplyReply Direct Link To This Post Posted: 01 Jun 13 at 6:31AM
Dear Andrew thanks for reply. Here is the code i m using:
  for J := 1 to ImgCOunt do
  Begin
     ImgID:= QP.GetImageID(J);
     QP.SelectImage(ImgID);
     if QP.ImageType = 1 then
     Begin
      QP.SaveImageToFile('F:\temp.jpg');
      ObjImage.IO.LoadFromFileAuto('F:\temp.jpg');
      ObjImage.IO.Params.JPEG_Quality:= 40;
      ObjImage.IO.SaveToFileJpeg('F:\temp.jpg');
      QP.ReplaceImage(ImgID, QP.AddImageFromFile('F:\temp.jpg',0));
     End;
  End;
     QP.SaveToFile('F:\new.pdf');

Is this correct way of reducing the image size? Is there any memory still present in pdf which is increasing file size. Please help me. Thanks in advance.
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 836
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 04 Jun 13 at 3:51AM
Have you tried calling QP.ClearImage(ImageID);  which will mostly remove the original image.  This line should go after the call to QP.ReplaceImage.

Are you also calling QP.CompressImages(1) at the start of your code.

Andrew.
Back to Top
janesmith View Drop Down
Beginner
Beginner


Joined: 30 Jul 19
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote janesmith Quote  Post ReplyReply Direct Link To This Post Posted: 30 Jul 19 at 9:41AM
HiSmile,
hoping not too late to answer your question. i met similar problem before. fortunately, my friend recomended FoneDog PDF Compressor to me, i finally compressed a 36MB pdf file, maybe you could have a try. hoping i can help you, good luck!
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3032
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 30 Jul 19 at 9:53AM
Hi "Jane Smith" ;-)

if you really are "Jane Smith" please give me a short note before i start the spam cleaner ;-)

Cheers,
Ingo

Back to Top
janesmith View Drop Down
Beginner
Beginner


Joined: 30 Jul 19
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote janesmith Quote  Post ReplyReply Direct Link To This Post Posted: 31 Jul 19 at 7:58AM
oh why not! i am new here, not so clear whether i disobey some "rules" or not?? i just want to help peole who met the similar problem. if that reply was not permitted, i can delete it! hoping i never ever borther u! if u want konw more, please email me (i am not sure whether i can psot my email here..so looking forward to your reply!Smile)
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3032
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 04 Aug 19 at 9:33PM
Hi Jane,

i'll let ypur post like it is but...
This here is more a community to support and help each other using the pdflibrary QuickPDF.
How to do the job with QuickPDF.
If you're not using the library... if you're not a developer and if you only want to get and set hints dealing with pdf documents as a user then this isn't a good choice here for you ;-)

but cheers and welcome here,
Ingo

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