Hi,
Am 14.05.2013 18:17, schrieb Maruan Sahyoun:
Hi Sébastien,
to get from the PDModel objects (high level api) to the COS Model objects (low
level API) you'd
> use getCOSObject() which always returns a COSBase but you could either cast
to COSDictionary or
> use instanceof to inspect if it's really one. COSObjectable is used as a
marker to mark that
> a PDModel object has a representation in the COS model.
That's correct, the PDModel is the high level api and there should be no need
to access the underlying data directly.
See http://pdfbox.apache.org/userguide/index.html for a quick intro into PD
Model and COS Model
You are right, it could have been implemented differently but currently that's
how it works.
The PDModel provides an abstraction layer, so that one has not to deal with the
low level part of the pdf spec. All (supported) values should be available using
a getter/setter.
BR
Maruan Sahyoun
Am 14.05.2013 um 17:54 schrieb Sébastien Dailly <[email protected]>:
Hello,
Is there a reason for PDColorSpace not to inherit from COSDictionary ?
Refering to pdfreference, section 3.7.2 (Resource Dictionnaries), a ColorSpace
is a dictionary, and this cause me trouble with the following resource :
127 0 obj
<<
/ColorSpace 289 0 R
/ExtGState 290 0 R
/Shading 291 0 R
/XObject <<
with lead to the following ColorSpace :
289 0 obj
<<
/CS0 [/DeviceN [/Cyan /Magenta]
/DeviceCMYK 97 0 R 98 0 R]
(in PDF 1.4)
Pdfbox 1.7 convert it as PDDeviceN classes, and does not allow me to walk
inside the referenced object. Is there a way to process for convert into a
dictionnary ?
(I'm waiting for the right to diffuse the pdf document)
Thanks,
--
Sébastien Dailly
BR
Andreas Lehmkühler