Created
March 19, 2013 12:52
-
-
Save jbuda/5195846 to your computer and use it in GitHub Desktop.
CF loop through PDF and find images
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfdirectory action="list" directory="#expandPath('/temp')#" name="pdfs" filter="*.pdf" /> | |
<cfoutput query="pdfs"> | |
<cftry> | |
<cfpdf action="extractimage" | |
source="#directory#/#name#" | |
destination="#expandpath('/imgs')#" | |
format="jpg" | |
imageprefix="#listFirst(name,'.')#_" | |
pages="1" | |
overwrite="yes" /> | |
<cfcatch type="any"> | |
<cfflush> | |
#name# no image<br/> | |
</cfcatch> | |
</cftry> | |
</cfoutput> | |
<br/> | |
images created |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment