Automating editing of low-level PDF structure.

Q: I'm using CosEdit (http://www.pdftron.com/pdfcosedit) to open PDFs
with syntax errors and then to save them with valid syntax. Do you
have a command line tool for this?
------------
A: There is no stand alone command-line tool, however you could use
PDFNet SDK (http://www.pdftron.com/pdfnet) to implement the required
low-level PDF manipulation. CosEdit itself is based on SDF/Cos API in
PDFNet.

As a starting point you may want to take a look at SDFTest sample
project (http://www.pdftron.com/pdfnet/samplecode.html#SDF). By
tweaking this console sample you should be able to implement the
required functionality.