On Wed, 27 Apr 2011 09:28:55 +1000 magick-users-boun...@imagemagick.org wrote: | > I did not know that Xpdf can extract the images from PDF losslessly. | > Hmmm the package does not even require the use of ghostscript! | > I wonder how it is processing PDF files? | | We do it about once a day over here; it functions reliably. I don't know about the details, but PDF is ASCII-based. So you can even extract the streams yourself by opening the PDF in an ASCII editor, looking for a stream that you know to be, say, a JPEG and extract it. At http://www.unfallrekonstruktion.de/imagemagick/BMW.pdf you'll find a PDF i have just generated. | | You can extract the part between "stream" and "endstream" and save it as a JPEG -- it is a simple as this (at least on my Windows computer); I've just tried. | | Wolfgang Hugemann
Hmmm that may be how PDF is storing your scanned JPEG's but I tried it on a more normal PDF document (mostly text with a few images) and could not locate the stream with the image. Also what if the embeded image contains a '<CR>endstream<CR>' character sequence! It is unlikely, but posible. There will need to be some escaping sequence involved. In other words your method may work well for your PDF wrapped JPEG's but it fails for other situations. It is however a nice technique to know, just not general. So the question again becomes how to extract EXACT images from PDF files! Anthony Thyssen ( System Programmer ) <a.thys...@griffith.edu.au> -------------------------------------------------------------------------- "All I can say is, enthusiasm, sincerity, genuine compassion, humour, can carry you through any lack of experience with... higher numerical values!" -- Ivoniva's Theory of Relationships Babylon 5, "Sic Transit Vir" -------------------------------------------------------------------------- Anthony's Castle http://www.ict.griffith.edu.au/anthony/ _______________________________________________ Magick-users mailing list Magick-users@imagemagick.org http://studio.imagemagick.org/mailman/listinfo/magick-users