[cl-typesetting-devel] An interesting problem from a neophyte...

Robert L. Read read at robertlread.net
Sun Jan 20 21:32:18 UTC 2008


Thanks for making cl-pdf and cl-typesetting; they are a great idea.

I'm attempting to use them now.  However, I am implementing a website,
and I want to render the PDFs on demand, not store them in files.  The
API to cl-pdf is stream-based, which in theory should allow me to send
in an "in-memory" stream, rather than a "file-based-stream".  For
example, I can almost get it to work by using the
"IN-MEMORY-OUTPUT-STREAM" of the "flexi-streams" package.

However, flexi-streams does not support file-position, which is used by
cl-pdf to write the "xrefs" section of the PDF.

I thought about attempting to extend a flexi-stream class to support
file-position, but that is little more than I want to take on right now.

So my questions are:

1)  Am I crazy to want to do this in-memory?
2)  What are the xrefs, and do I need them?
3)  Is it necessary to use "file-position" to compute this? (perhaps the
PDF spec and character encoding issues basically for the answer to be
"yes")
4)  Is there some package that supports "in-memory" files that corectly
computes file-position that I may not know about?


-- 
Robert L. Read <read at robertlread.net>
Konsenti.com




More information about the cl-typesetting-devel mailing list