[cl-pdf-devel] Problem with write-document with stream as opposedto pathname

David J Cooper Jr david.cooper at genworks.com
Thu Feb 26 21:24:02 UTC 2004


Hi Erik,

Marc B. writes:
 > 
 > If you want to generate a PDF in memory, to send in a web server
 > for instance, you need to write it in a with-output-to-string and
 > then write the string to you real stream.
 > 

And depending on what kind of stream you are talking about, it might
support something functionally equivalent to file-position which you
can use, for example the streams used by allegroserve on ACL support
excl::socket-bytes-written or something like that, which I have found
will work (and Franz/JKF confirms it should be stable to use) in lieu
of file-position. But the code I sent Marc for that did not make it
into cl-pdf because apparently it doesn't really offer much advantages
over writing to an intermediate string as Marc suggests above (or just
using a temporary file for that matter), and it adds the complication
of having to specialize for the type of stream (and God knows how many
stream varieties there might be out there). 

If you think it makes sense to re-open this issue let Marc and me
know.

 -dave





More information about the cl-pdf-devel mailing list