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 - Problem replacing BMP images with JPG image
  FAQ FAQ  Forum Search   Register Register  Login Login

Problem replacing BMP images with JPG image

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

Joined: 16 Mar 16
Location: Windsor, UK
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote dfloBob Quote  Post ReplyReply Direct Link To This Post Topic: Problem replacing BMP images with JPG image
    Posted: 16 Mar 16 at 10:07AM
Hi All,

I am having issues when trying to replace BMP images in a PDF with JPG Images.  I am extracting the images details from the PDF fine but when I replace the images with JPG versions of the same image the image is not being replaced.  The replace code I'm using is as follows (VBScript)

                        DPL.ReplaceImage ImageID, DPL.AddImageFromFile(NewImageFileName,0)
                        DPL.ClearImage(ImageID)

If I extract the original images to disc and then replace the images in the PDF with exactly the same BMP images from disc it's working fine.  It's just when I replace with JOG images that it doesn't work.

I'm new to QP so any help would be appreciated.

Thanks
Bob
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3530
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 17 Mar 16 at 9:11PM
Hi Bob,

i'm wondering what's in ImageID after your ReplaceImage...
Still the replaced image or the new one?
if it's then the new one and you're doing the ClearImage then there's still the old one... perhaps ;-)
I think you should try first the ReplaceImage alone to see if there's success.
Before the ClearImage a new SelectImage could be necessary... perhaps ;-)
http://www.debenu.com/docs/pdf_library_reference/ReplaceImage.php
Perhaps it's better using the new imageid as second parameter...

Cheers and welcome here,
Ingo

Cheers,
Ingo

Back to Top
dfloBob View Drop Down
Beginner
Beginner
Avatar

Joined: 16 Mar 16
Location: Windsor, UK
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote dfloBob Quote  Post ReplyReply Direct Link To This Post Posted: 18 Mar 16 at 9:44AM
Hi Ingo,

Thanks for your reply.

It's still the old image in ImageID.  

I think your suggestion of trying SelectImage before I use ClearImage may help so I will try that first.

I appreciate the help.

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