PDF support in this SDK allows you to quickly extract embedded images from a PDF file, correct them with Perfectly Clear, then replace the original images with the corrected version. The result will be a PDF file in the exact same structure as the original - but all the photos will be Perfectly Clear!
Access image files embedded in PDF files easily with our PFCPDFImageIterator, then use a PFCPDFImage and PFCImage to access the image itself.
The results will automatically be embedded back in the PDF file.
- Create a PFCPDFImageIterator and load the PDF file
printf("Cannot load path %s\n", inputPath);
return 1;
}
- Begin iterating over the images
- Create a PFCImageFile from the extracted image
printf(" working on image %d\n", i);
Then correct the PFCImageFile as normal
- Once done with all embedded images, save the resulting PDF:
printf("Cannot save to %s\n", outputPath);
return 1;
}
We provide full source code to a ready-to-run command line application to make it easy to get stated with PDF file processing.
Notes
- Images need to be embedded in a PDF file for them to be accessible to the SDK. "Flattened" PDFs are not supported.
* Each image that is processed will be evaluated by our AI-based Clipart Detection. This will allow images for headings, borders, and other clipart to skip Perfectly Clear processing - ensuring these files look exactly as the customer intended. Control this detection method using the PFCREJECTOPTION flag.