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

Marc Battyani marc.battyani at fractalconcept.com
Mon Jan 21 08:04:19 UTC 2008


Robert L. Read wrote:
> On Sun, 2008-01-20 at 23:01 +0100, Marc Battyani wrote:
>   
>>> 4)  Is there some package that supports "in-memory" files that
>>>       
>> corectly
>>     
>>> computes file-position that I may not know about?
>>>   
>>>       
>> Sure, just write the pdf to a string. It's what I do in my web
>> applications.
>>
>> Marc
>>     
> Do you mean generate the file, and then read it into a string?  I
> understand that will work --- my goal is to avoid writing a file at all.
>
> Does the API allow you to write directly to a string?  I don't see that
> it does.
>   
Sure, you can use (defmethod write-document ((s stream) &optional
(document *document*)) to write to a string:

  (with-output-to-string (s)
    (pdf:with-document ()
      ...
       (pdf:write-document s)))

Marc




More information about the cl-typesetting-devel mailing list