Print Page | Close Window

Check if image exists in a PDF

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=4030
Printed Date: 18 May 24 at 6:51AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Check if image exists in a PDF
Posted By: ricardoprg
Subject: Check if image exists in a PDF
Date Posted: 06 Dec 23 at 10:39PM
I'm using the "FindImages" command to check, but in a PDF, it's returning the 'out of memory' error. Has anyone ever encountered this problem? Could I use the "HasFontResources" function to check?



Replies:
Posted By: tfrost
Date Posted: 07 Dec 23 at 1:17PM
We may need a bit more information to help you here.  First, which version of QuickPDF and which programming language are you using?  FindImages returns a zero or an image count, so if it returns, what is the return value? And if it does not return, what is actually showing the 'out of memory' error? Does the problem occur with just a specific PDF, even one with no images, or does it always happen? You could also try the Extraction/ExtractAllImages sample in DebenuQuickPDFLibraryDemo and see if you get the same result there with your PDF.  I hope some of this helps!


Posted By: Ingo
Date Posted: 07 Dec 23 at 8:05PM
Hi Ricardo :) 

If you only wanna check if a pdf is a real pdf or only a converted image you can use HasFontResources.
The function returns with the number of fonts (embedded or only linked).
If it returns with 0 then it's pretty sure that the pdf is only a converted image.

Welcome here :)



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