[cl-typesetting-devel] cl-typesetting documents with damaged xreftable

Marc Battyani marc.battyani at fractalconcept.com
Sat Jan 22 02:28:24 UTC 2005


"Andrew Philpot" <philpot at ISI.EDU> wrote:
>
> I'm generating documents dynamically using cl-typesetting and then
> serving them to a web browser.
>
> I'm doing something wrong, however.  Some browsers' pdf plugins, and
> some printer drivers as well, just give up.  Linux xpdf complains
> about my documents, although it usually displays them correctly.
> The xpdf error message is
>
>   Error (O): PDF file is damaged.  Attempting to reconstruct XREF
>   table.
[...]
> Any suggestions would be greatly appreciated.

The startxref is not set (same pb for the object indexes)

startxref
NIL
%%EOF

This is probably because you try to generate a pdf file directly into a
socket stream for which get-file-position is not defined.
You will have to write the file to a string with a with-output-to-string and
then send the string to the socket-stream.

Marc





More information about the cl-typesetting-devel mailing list