Many times I create a PDF either programmatically and there might be a problem with it, e.g. some specific letter might no show up well or I might have encoding issues etc.<
another tool would be pdfstreamdumper
https://github.com/dzzie/pdfstreamdumper
its actually quite intuitive to go through
made to analyze javascript / as3 code etc
has built in quite a few things
(hexviewer / refactor (deobfucators) etc)
This is what I usually do in Linux:
Install qpdf
package and run qpdf --qdf --object-streams=disable orig.pdf decoded.pdf
. Now you can open decoded.pdf
in a text editor and see the pdf source.
Also I installed PDFedit on linux which has a gui program which let you inspect all the pdf structure, from the comfort of a graphical interface.
You can see the structure of a PDF using a tool like CanOpener, PDFedit or Acrobat (I wrote a blog article on the subject at http://www.jpedal.org/PDFblog/2010/09/useful-pdf-tools-pdfedit/)
How about http://blog.didierstevens.com/programs/pdf-tools/ or http://podofo.sourceforge.net/about.html
For a list of PDF tools and libraries - http://en.wikipedia.org/wiki/List_of_PDF_software You may find other tools there that fit your needs.
Just open it in some text editor. PDF is actually an ASCII file (and it can contain embedded binary data).
Well, I wanted to debug some PDF files that I was generating using pdfLaTeX the other day, and I found that Adobe [Acrobat] Reader was not very helpful, as the slightly invalid PDFs I was producing would open as if there was no problem, they only failed to close. This made the TeX/View/Edit cycle a bit of a pain, since I would have to terminate the entire Reader process before I could TeX again.
I achieved more favorable results using Ghostscript. In my case, this was by way of GSview since I was using Windows; if I had been using Linux, I would have used gv instead. Not only did this not prevent me from re-TeXing the file (even while it was still open), it was nice enough to produce nigh-incomprehensible error messages rather than pretending everything was okay. These enabled me, with a bit of squinting, to see what I'd messed up in my PDF code and finally to produce the example given in this tex.SE answer of mine
It would have been nice if I could have figured out how to tell Ghostscript to include slightly more detail in the error message (well, I probably could have, if I'd looked at the right part of the manual for long enough, actually), but it wasn't that hard to figure out what I'd messed up by comparing the PDF with the Ghostscript error message and with Adobe's PDF reference. (I link to the archive page because the PDF references there were produced entirely by Adobe, and are of much higher typographic quality as well as much smaller size than the ISO standard for PDF that is on the main page.)
Of course, in order to make any sense of it in your text editor, it will probably be important that the page streams not be compressed, so I would suggest you figure out how to instruct your software not to compress them, or find something with which to uncompress them again afterwards.
So, in short:
Don't use Adobe [Acrobat] Reader (until you think your PDF is good, anyway).
Do use Ghostscript (typically through GSview or gv).
Do try to instruct your software to refrain from compressing page streams.
Do use a text editor to look at the PDF (preferably set to "PostScript" mode, as the syntax is closely related).
Do use the PDF reference.