Am 14.09.2010 20:41, schrieb Andreas Lehmkuehler:
Am 14.09.2010 09:41, schrieb Timo Boehme:
It might be the case that normally such names should be COSName objects
but most objects (color space objects etc.) allow the user to set such
names while creating/manipulating a PDF document and typically accept a
COSBase object. Thus the user might add the name as a COSString.

AFAIU the pdf specs, the "alternateColorspaces" array of a DeviceN
colorspace should only contain COSName objects. Do you have an example
with COSStrings instead of COSNames?

For the PDF documents I currently work with all use COSName objects. I was more concerned that it could be set by a program using COSString instead of COSName like you can see in org.apache.pdfbox.pdmodel.PDDocumentCatalog line 124:
root.setItem( COSName.TYPE, new COSString( "Catalog" ) );
According to the specification "Catalog" should be of type COSName (bug). Thus my aim is to have a robust program - but maybe the intention should be to signal such wrong type usage immediately to the user instead of silently accept the value?

Kind regards,
Timo

--

 Timo Boehme
 OntoChem GmbH
 H.-Damerow-Str. 4
 06120 Halle/Saale
 T: +49 345 4780472
 F: +49 345 4780471
 timo.boe...@ontochem.com

_____________________________________________________________________

 OntoChem GmbH
 Geschäftsführer: Dr. Lutz Weber
 Sitz: Halle / Saale
 Registergericht: Stendal
 Registernummer: HRB 215461
_____________________________________________________________________

Reply via email to