> -----Original Message-----
> From: Leonard Rosenthol [SMTP:[EMAIL PROTECTED]
> Sent: Thursday, March 20, 2003 16:21
> To:   Paulo Soares; '[EMAIL PROTECTED]'
> Subject:      RE: [iText-questions] Modifying Metadata
> 
> At 4:09 PM +0000 3/20/03, Paulo Soares wrote:
> >     The filters are not modified, for streams it does a straight copy,
> >only the strings may look different. The objects are also renumbered.
> 
>       Then that should work fine for what the person was attempting 
> to accomplish.  Any idea why he was seeing "such problems"??
> 
        I think that the problem was the use of the same file to read and
write.

>       Do you read the entire stream into memory and then write it 
> back out, or do "block" I/O?    And why modify/read ANY object (as an 
> 
        The streams are not read, only the offset in the file and the length
is kept. Writing is done by block copying from file to file. It's in this
cases and many others that I miss C and my beloved pointers.

> object) - you should be able to just copy the object contents "raw" 
> from file to file and therefore avoid the memory overhead (other than 
> the Xref).
> 
> 
> >     It could be changed to read objects by demand but I don't know how
> >many would remain untouched with the change of some indirect references.
> 
>       But the only thing that needs to change are indirect 
> references - and those can be easily handled since you know where 
> they might arise (dicts and arrays).
> 
        The big problem is that parsing is still needed and that's where the
bottleneck is. I take 60 seconds to read pdfreference.pdf but only 5 to
write it. The memory usage is always low as the streams are not kept in
memory.


> >This would only gain some speed and people really wanting speed are
> better
> >served with a C library.
> 
>       Agreed.  (not that iText is that slow...)
> 
>       I wonder how iTextSharp performs in this regard?!?!
> 
> 
> >     In this particular Info problem what I intend to do is an
> >incremental update with the new Info, nothing fancy.
> >
> 
>       Incremental update would be a GREAT addition - not just for 
> the Info changes, but potentially for all PdfStamper() changes...
> 
        That's not a bad idea. All that is required is a new page dictionary
with the same number and several streams with the new content with the
original stream intact. Encryption wouldn't be possible, though.

        Best Regards,
        Paulo Soares


> Leonard
> -- 
> --------------------------------------------------------------------------
> -
> Leonard Rosenthol
> <mailto:[EMAIL PROTECTED]>
> Chief Technical Officer                      <http://www.pdfsages.com>
> PDF Sages, Inc.                              215-629-3700 (voice)
>                                               215-629-0789 (fax)


-------------------------------------------------------
This SF.net email is sponsored by: Tablet PC.  
Does your code think in ink? You could win a Tablet PC. 
Get a free Tablet PC hat just for playing. What are you waiting for? 
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to