work in progress (though stalled now). has three tools so far:
- pdf/text, converts a pdf to text (though does not implement character
encoding/sets, and whitespace is often wrong).
- pdf/walk, a tk program for navigation the structure of a pdf.
- pdf/inflate, rewrites pdf file, reformatting pdf objects and
there is no code to render a pdf on a canvas.
this package contains a library & tools for reading pdf files. in
the future, perhaps a pdf renderer can be build on top of this code.
there is no documentation since this is a work in progress. feel
free to fix/improve!
make sure you have $ROOT set, now "mk install" to compile and install
when building from within inferno, insert SYSHOST=Inferno and ROOT=
in the mk invocations to override the values in the mkconfig.
the latest version can be found at:
# licence & author
appl/lib/pdfinflate.b is copyright & subject to the license from vitanuova.
all other files are in the public domain. this code has been written by
mechiel lukkien, reachable at email@example.com or firstname.lastname@example.org.
doc/syntax.txt has some random blurps on the syntax/structure of
pdf files. todo.txt has a (probably outdated/inaccurate) list of
things to improve.
- lzw decoding sometimes breaks
- improve the parser appl/lib/pdfread.b, perhaps more proper
tokenizer, and probably use exceptions for error propagation.
- implement DCTDecode filter.
- pdf/inflate: fix Prev byte offset in trailers
- pdf/inflate: fix remaining bugs. like fonts that are wrong in the new file.
- pdf/inflate: if compressed data has non-ascii in it, just keep
the original encoding? image-specific encodings can probably be
kept too, no need to make the file size huge with raw bitmaps.