Jim, thanks for the link to the discussion, which I just finished reading. I will ask Jason abut the GhostScript solution and we’ll see what he says.
For the most part (99.9%), my users can be trusted. I was looking at this from the point of…Since I need to be able to share ‘files’, what is an easy format that pretty much everyone can create and that can be read on Windows and OSX directly? I thought PDF would be first in line.
I guess my concern was that if a user was really a hacker in disguise, could they put something in a file and try to pass it off as a PDF and that when one of my users opened it in the Xojo HTMLViewer, it would have the potential to do great damage? It seemed that if I read the header, and it contained “%PDF-”, I could let it go.
As Tim said, “The absence of the header will identify that it is not a PDF”.
Also, when Michel Bujardet said “I doubt many people will create fake PDF files”, that made me think that I had some level of safety here.
It appears that my journey is still ongoing. Thanks Jim