Do you own a Debenu Quick PDF Library 12/11/10/9/8/7? Upgrade to Debenu Quick PDF Library 13!

Foxit Quick PDF Library

Frequently Asked Question:

Return to FAQ Index

Check to see if a page in a PDF contains any images

Question

How do I check to see if a page in a PDF file contains images?

Answer

You can use the DAGetImageListCount direct access function to quickly check to see if a page in a PDF contains any images. Here is some JScript sample code:

h = QP.DAOpenFile(GetInputFolder() + "test.pdf", "");
p = QP.DAFindPage(h, 1);
imlist = QP.DAGetPageImageList(h, p);
imcnt = QP.DAGetImageListCount(h, imlist);

if (imcnt == 0)
{
MsgBox("No images")
}
else
{
MsgBox("Images!")
}

© 2015 Debenu & Foxit. All rights reserved. AboutBuyContactBlogNewsletterSupportFAQProduct UpdatesForum