> -----Original Message-----
> From: Leonard Rosenthol [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, May 02, 2002 1:46
> To: [EMAIL PROTECTED]
> Subject: [iText-questions] iText design question
>
> I have two questions about the low level design decisions make during
> the coding of iText.
>
> 1) Why the are two different types of low level PDF objects?
> PRObject vs. PDFObject, etc.
>
The original objects (PdfObject) where designed to output PDF and as
such contain additional information that cannot be extracted from the read
pdf. The case of PdfString/PRString is paradigmatic. A PdfString contains a
Unicode string and an encoding. When this object is output to the pdf the
string is converted to a byte array depending on the encoding. The PRString
contains only a byte array disguised as a string that when output to the pdf
is only converted with direct byte casting. It's impossible to know what was
the original encoding. PdfStream contains the entire stream and PRStream
contains pointers to the file to save memory space. At the time this was
what I thought was the straightforward way to do things, maybe something can
be merged and changed to have an unified approach.
> 2) Why are both these sets of objects private to their package,
> thereby disallowing "low level" access to applications?
>
This was essentially to protect the user from doing wrong things.
The structure of iText also doesn't allow to generate an arbitrary document
like PJ so it wasn't very important to expose the classes.
> I ask these as I am in the process of extending the reading, parsing
> and manipulating capabilities of the library - but these particular
> restrictions are a major roadblock, since it prevents object-level
> access to the application.
>
> And if there isn't any good reason - would one of the maintainers be
> willing to commit the changes to make these objects public?
>
For me they can all be public. I'm preparing a new release with
shading patterns and I'll make those classes public. I'll also see if some
of the PRObject can be eliminated and merged with the PdfObject.
Best Regards,
Paulo Soares
> Thanks in advance,
> Leonard
> --
> --------------------------------------------------------------------------
> -
> Leonard Rosenthol
> <mailto:[EMAIL PROTECTED]>
> Chief Technical Officer <http://www.pdfsages.com>
> PDF Sages, Inc. 215-629-3700 (voice)
>
>
> _______________________________________________________________
>
> Have big pipes? SourceForge.net is looking for download mirrors. We supply
> the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
_______________________________________________________________
Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions