Reading PDF - a cry for help

Ken Ray kray at sonsothunder.com
Thu Sep 29 11:24:51 EDT 2011


>> Has anyone any suggestion as to how I might proceed? My app works so nicely with JPG and PNG files, and I have (a little) belief that I could make it work with TIFF files, but without PDF input I am dead in the water.

Graham, the other alternative is to work with the PDF file on a binary level (I'm working on something like that right now for importing PSD files). After a quick glance at the PDF specification it looks like a bunch of it is in plain text so it might actually be easier to work with it that way.

Are you looking at just extracting the images? Or other relevant parts of the PDF? The reason I ask is that it looks like binary data is always contained between two lines: "stream" and "endstream", so extracting just the streaming data should be pretty quick to do; although the next step would be going to read the bytes of what was extracted and then determine if it's an image or some other thing that had to be represented with a "stream" in the PDF...

Just my 2 cents,

Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/	




More information about the use-livecode mailing list