Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 4ADEE200C7C for ; Mon, 22 May 2017 06:17:55 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 49549160BCF; Mon, 22 May 2017 04:17:55 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8F598160BC5 for ; Mon, 22 May 2017 06:17:54 +0200 (CEST) Received: (qmail 41048 invoked by uid 500); 22 May 2017 04:17:48 -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 41034 invoked by uid 99); 22 May 2017 04:17:47 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 May 2017 04:17:47 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 18D8EC059A for ; Mon, 22 May 2017 04:17:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.629 X-Spam-Level: ** X-Spam-Status: No, score=2.629 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 8oon-3Sogvmg for ; Mon, 22 May 2017 04:17:45 +0000 (UTC) Received: from mail-qk0-f182.google.com (mail-qk0-f182.google.com [209.85.220.182]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id E766F5FC57 for ; Mon, 22 May 2017 04:17:44 +0000 (UTC) Received: by mail-qk0-f182.google.com with SMTP id y201so96907421qka.0 for ; Sun, 21 May 2017 21:17:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=oGf99LedFnMopjwEyGZg3kQ1ugNVIeuFV8fBPNaSDbA=; b=aAu/P6z11AZEZDeZ8NObtVz2rG+Oa91KXwJJHglBCw084Yj2mKGrl64zlNbr4MOsyA 2uZiXov9hoWYVY9RFRYM2fStAjuxqE3us7sKZJ3oP1gAmV6jtvsemzZAtNfFtD/muAwE KW0b7kBZZ6RcrqtEdTGrdqvF7riWQx4Cu8R8wrqZ0z2+Hg5QQktG0Y0/7NRpVevI3Oh7 RWxlaIkFufVT8vwctrjkG9IRW6QNmWi0tyqyBeLOIuP1Ye/dO3A2r0t8f5Aq3c/H8Lv6 xhCMvNMdf+mq8tmiX2JUpGC3AggxzDvOM3M5DJSp58j9AuUNJL2Qq/E+OSZgxMcmTAql Sx8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=oGf99LedFnMopjwEyGZg3kQ1ugNVIeuFV8fBPNaSDbA=; b=OkzTFngyb9Nt4wRy4O0qZ5LZoTqGRPkYTpJFI0YunPDlek7FJp0pDit+2f3TVGsFQU DtYEtcvFYXGuB9DraJxoDGZ2bkKuGSGE8Jj0TZjRav2EA2xT5OzD4JeVOLT3ZVhPZUMN +WEHdLu1pgnKFq+i6rgRsdAs+tr+LesOjfpUjrwgTvTpmhsfX4SZFUcrMdT95hEWo3Zp smwh5lzaM8f5Vs8upamwG9buAs5h1YAgWfIXgXJdqR1nWUybypekewZFQpjZbP9/8Xvb YStOI3ZIAk9iPxHDLJ/3WnkPnoDP2uJd7VBe68lkuAQxa67ePVPCqt5M3D0Aq9CcTD/g 54FA== X-Gm-Message-State: AODbwcCQ+MjBsDrxFmRaOm0LnPnwoRgaPNFDS/z2VyesoBiU4+tjUPL4 sYc/TqHZfC3QlRqbi9JbFAZMXUV4va7iSgU= X-Received: by 10.55.33.70 with SMTP id h67mr20603538qkh.163.1495426663813; Sun, 21 May 2017 21:17:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.156.73 with HTTP; Sun, 21 May 2017 21:17:43 -0700 (PDT) In-Reply-To: References: From: karthick g Date: Mon, 22 May 2017 09:47:43 +0530 Message-ID: Subject: Re: Linearized dictionary To: users@pdfbox.apache.org Content-Type: multipart/alternative; boundary="001a1140584c1597920550152758" archived-at: Mon, 22 May 2017 04:17:55 -0000 --001a1140584c1597920550152758 Content-Type: text/plain; charset="UTF-8" Hi team, Here is the code, I am using COSName.getPDFName("Linearized). The problem is PDDocument pdDoc = PDDocument.load(new File("")); COSDocument cosDoc = pdDoc.getDocument(); List lObj = cosDoc.getObjects(); for (Object object : lObj) { COSBase curObj = ((COSObject) object).getObject(); if (curObj instanceof COSDictionary) { COSDictionary cOSDictionary = (COSDictionary) curObj; if (cOSDictionary.keySet().contains(COSName.getPDFName("Linearized"))) { //System.out.println("Linearized"); } } } While using 1.8.2 Linearized is working properly. But in 2.0.5 I can not get the linearized and I can't check the linearized as it is not in the dictionary keyset. Please let me know if you need more details. Regards, Karthick G On Fri, May 19, 2017 at 9:27 AM, karthick g wrote: > Hi, > * I need to Check whether my PDF file is Linearized or not, for fast view > web. * > In the previous version (1.8.2) of PDFBox Linearized is in the COSName. I > will get the COSDictionary and check whether Linearized is available in the > COSName and conclude the PDF is suited for fast web view. Now Linearized > keyword is not in > the List of COSName. How can I get the Linearized dictionary in PDFBox. > Please let me know if you need more details. > > Regards, > Karthick G > > > > On Thu, May 18, 2017 at 9:17 AM, karthick g > wrote: > >> Hi team, >> >> I am a long time user of PDFBox. We starts to migrate pdfbox from 1.8.2 >> to 2.0.5. >> During migration I found that Linearized dictionary moved to preflight >> jar. >> I created the PDDocument based on preflight context which is returning >> null. >> Since the PDDocument is null I can't proceed further. What is the right >> way to >> get Lineraized dictionary in the current version of PDFBox . Please guide >> me. >> Please let me know if you need more details. >> >> Regards, >> Karthick G >> >> >> >> > --001a1140584c1597920550152758--