Yeah we have had this issue too. Bad PDFs seem to choke nearly all PDF
processors , including adobes own, and ActivePDF etc. They all just die.
I wrote a small, check to help root out some of the bad ones
<cfset f = "#ServerDirectory#\#ServerFile#">
<cffile action="READ" file="#f#" variable="data">
<cfif find("%!",data,1) and find ("PS-Adobe-",data)>
<cfset valid = 1>
<cfelse>
<cfset valid = 0>
</cfif>
<cffile action="DELETE" file="#f#">
It seems to help. If you have the time, which I didn't, you chould use the
"file" program or code, most linux dists. have it installed or cygwin.com
for win32. This uses a file called a "magic" file which defines signatures
for different types of files, and then the file command tells you what
"type" of file it is. You can use this to tell if your PDF files is bad,
works 99% percent of the time. I you write one, give me a copy!
WG
> For some reason, once in a while, there is a "bad" PDF that causes
> GhostScript to choke. When that happens, cf_magicktag throws an error.
>
> Is there anyway to get the tag to just skip over the bad PDF and continue
> process the batch?
>
> H.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com