Hi

I have tried this


*   PDDocument pdfDocument = new PDDocument();*
*   pdfDocument = PDDocument.load(inputPDF);*
*   PDDocumentCatalog cat = pdfDocument.getDocumentCatalog();*
*   COSDictionary dict = cat.getCOSDictionary();*
*   bool isCollection = dict.containsKey("Collection");*

and it seems to be working as it returns isCollection=true for portfolio
and isCollection=false for nomal PDF.

Now will test for various PDF and see if it can be used to identify PDF
Portfolio or not.

Thanks,
Ramesh

On Fri, Sep 11, 2015 at 1:36 PM, Ramesh Shrestha <[email protected]>
wrote:

> Hi
>
> I have tried following code snippet
>
>
> *    PDDocument pdfDocument = new PDDocument();*
> *    pdfDocument = PDDocument.load(inputPDF);*
> *    PDDocumentCatalog cat = pdfDocument.getDocumentCatalog();*
>
> But I am not able to find /Collection entry. Can you help me to find that
> entry?
>
> Thanks
> Ramesh
>
> On Fri, Sep 11, 2015 at 1:06 PM, Maruan Sahyoun <[email protected]>
> wrote:
>
>> Hi,
>>
>> > Am 11.09.2015 um 08:42 schrieb Ramesh Shrestha <[email protected]>:
>> >
>> > Hi,
>> >
>> > Is it possible to identify whether PDF is PDF Portfolio or not?
>> >
>>
>> you could check if the Document Catalog dictionary contains a /Collection
>> entry.
>>
>> BR
>> Maruan
>>
>>
>> > Thanks,
>> > Ramesh
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
>
> --
> pasa
>



-- 
pasa

Reply via email to