Tuesday, June 17, 2008

Scripting Solid PDF Tools to Extract Images from PDF Files

New to scripting with Solid Documents software? If so, please check out our first post on the subject.

One of the new features in Solid PDF Tools Scan to PDF is the ability to script image extraction from PDF files. You can extract images as specific file types and select the location you wish the files to be extracted to.

Doing this is fairly simple, as you can see in the script below:

<</FileName (c:\\temp\\input.pdf) >> FileOpen

<</OutputFolder (c:\\output\\)
/ColorImageFormat/Tiff >> ExtractImages

<</FileName (c:\\temp\\input.pdf) >> FileOpen

<</OutputFolder (c:\\output\\)
/ColorImageFormat/Jpeg >> ExtractImages
FileClose Exit
The above example extracts each image in the PDF file twice; once as a TIFF file and once as a JPG file. After that it closes the PDF file and exits Solid PDF Tools.

Have any comments or questions? Please contact us with your feedback.

0 comments: