pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vakhtang koroghlishvili <vakhtang.koroghlishv...@gmail.com>
Subject Re: how to update COSDictionary?
Date Mon, 20 Jan 2014 11:53:47 GMT
Hello,

I already found the solution, I can just cast object like this:

COSDictionary catalogDictionary = catalog.getCOSDictionary();
COSDictionary dssDictionary =  (COSDictionary)
catalogDictionary.getDictionaryObject(COSName.getPDFName("DSS"));

thaks


On Mon, Jan 20, 2014 at 1:37 PM, Vakhtang koroghlishvili <
vakhtang.koroghlishvili@gmail.com> wrote:

> Hello,
>
> I'm creating dictionary in the catalog.
>
> *PDDocumentCatalog catalog = template.getDocumentCatalog();*
> *COSDictionary dssDictionary=new COSDictionary();*
> *dssDictionary.setItem(COSName.getPDFName("Certs"), cosCerts);;*
> *catalogDictionary.setNeedToBeUpdate(true); *
> *catalogDictionary.setItem(COSName.getPDFName("DSS"), dssDictionary);*
>
> Ok. Everything works!
>
>
> QUESTION1)
>
> Now, Imagine that I need to update my dictionary. I can get this
> dictionary like this:
>
> COSBase dssCosBase =
> catalogDictionary.getDictionaryObject(COSName.getPDFName("DSS"));
>
> Ok, It conataint my certificates.
> But how can I add another certificates to this? I did't find any method
> for that.
>
> QUESTION 2)
> I can get COSBase  Dictionary but  can I get COSDictionary object?
>
>
> I'm finding solution, how to update my
>
> *COSDictionary.thanks*
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message