Return-Path: X-Original-To: apmail-pdfbox-users-archive@www.apache.org Delivered-To: apmail-pdfbox-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C57E510B63 for ; Mon, 20 Jan 2014 11:54:20 +0000 (UTC) Received: (qmail 56463 invoked by uid 500); 20 Jan 2014 11:54:20 -0000 Delivered-To: apmail-pdfbox-users-archive@pdfbox.apache.org Received: (qmail 55992 invoked by uid 500); 20 Jan 2014 11:54:16 -0000 Mailing-List: contact users-help@pdfbox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@pdfbox.apache.org Delivered-To: mailing list users@pdfbox.apache.org Received: (qmail 55974 invoked by uid 99); 20 Jan 2014 11:54:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Jan 2014 11:54:14 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of vakhtang.koroghlishvili@gmail.com designates 74.125.82.43 as permitted sender) Received: from [74.125.82.43] (HELO mail-wg0-f43.google.com) (74.125.82.43) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Jan 2014 11:54:08 +0000 Received: by mail-wg0-f43.google.com with SMTP id y10so6835041wgg.22 for ; Mon, 20 Jan 2014 03:53:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=qUXggcCvo6JmQsft5InjfRsiOCnaGgsBs25bQV5oJ/o=; b=Pvc2KKFGQVyZbpx0DrYFnWz/4JpfeqwxLX/9wq5pf15J/l6M5WoDLPkaHghfhq1TZi fS5F3lQmh7aE+JVsJEq3tbf4MZOutZ7HAYuZLqrnUmy5UMQ6nSgAewdZ3xtHQJFgrN+j Y4/65fQUYhseqPkJHcGYH8S7pGTyPVPpqMvXt/uIpO8QeVwE01SnrbfXUVLjUMDrVcJj zokEoUoPtYSz4oyMrvZopwJXkoyqMphE/qDyVCIcbY+HxnaA7zk+9T/edtkJlQ3HbylS O+Yao8LVq1ELcnEII7ah1sN1F5q/GLU5dO/vBa6Cjk/2Rzq4qauVlK7REFwGZIivixhr OK7Q== MIME-Version: 1.0 X-Received: by 10.194.133.34 with SMTP id oz2mr13918763wjb.14.1390218827756; Mon, 20 Jan 2014 03:53:47 -0800 (PST) Received: by 10.181.13.106 with HTTP; Mon, 20 Jan 2014 03:53:47 -0800 (PST) In-Reply-To: References: Date: Mon, 20 Jan 2014 15:53:47 +0400 Message-ID: Subject: Re: how to update COSDictionary? From: Vakhtang koroghlishvili To: users@pdfbox.apache.org Content-Type: multipart/alternative; boundary=089e012284f6637a2a04f0658bcf X-Virus-Checked: Checked by ClamAV on apache.org --089e012284f6637a2a04f0658bcf Content-Type: text/plain; charset=ISO-8859-1 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* > --089e012284f6637a2a04f0658bcf--