From dev-return-57875-archive-asf-public=cust-asf.ponee.io@pdfbox.apache.org Wed Aug 22 18:10:05 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id A7654180778 for ; Wed, 22 Aug 2018 18:10:04 +0200 (CEST) Received: (qmail 77160 invoked by uid 500); 22 Aug 2018 16:10:03 -0000 Mailing-List: contact dev-help@pdfbox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pdfbox.apache.org Delivered-To: mailing list dev@pdfbox.apache.org Received: (qmail 77117 invoked by uid 99); 22 Aug 2018 16:10:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Aug 2018 16:10:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 543331A03BC for ; Wed, 22 Aug 2018 16:10:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.301 X-Spam-Level: X-Spam-Status: No, score=-110.301 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id KL0QH0cg8wwU for ; Wed, 22 Aug 2018 16:10:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id A08255F437 for ; Wed, 22 Aug 2018 16:10:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id EA874E0E87 for ; Wed, 22 Aug 2018 16:10:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 85ECC2468F for ; Wed, 22 Aug 2018 16:10:00 +0000 (UTC) Date: Wed, 22 Aug 2018 16:10:00 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: dev@pdfbox.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PDFBOX-4298) NullPointerException when doing overlay MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/PDFBOX-4298?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D165= 89072#comment-16589072 ]=20 ASF subversion and git services commented on PDFBOX-4298: --------------------------------------------------------- Commit 1838652 from tilman@apache.org in branch 'pdfbox/trunk' [ https://svn.apache.org/r1838652 ] PDFBOX-4298: avoid NPE; use similar text > NullPointerException when doing overlay > --------------------------------------- > > Key: PDFBOX-4298 > URL: https://issues.apache.org/jira/browse/PDFBOX-4298 > Project: PDFBox > Issue Type: Bug > Components: Utilities > Affects Versions: 1.8.15, 2.0.11 > Reporter: Mikita Geer > Priority: Major > Fix For: 1.8.16, 2.0.12, 3.0.0 PDFBox > > Attachments: NPE.pdf, pdf2.pdf > > > When=C2=A0input pdf file for overlay contains empty page (with contents = =3D=3D null) like NPE.pdf file we get NullPointerException in Overlay.addOr= iginalContent method. It occurres even if we overlay over other than this e= mpty page. > Here's some sample code to reproduce the problem: > {code:java} > Overlay overlayObj =3D new Overlay(); > File file1 =3D new File("NPE.pdf"); > PDDocument originalDoc =3D PDDocument.load(file1); > overlayObj.setOverlayPosition(Overlay.Position.FOREGROUND); > overlayObj.setInputPDF(originalDoc); > Map ovmap =3D new HashMap<>(); > File file2 =3D new File("pdf2.pdf"); > ovmap.put(2, file2.getPath()); > overlayObj.overlay(ovmap); > originalDoc.save("test__result.pdf"); > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org For additional commands, e-mail: dev-help@pdfbox.apache.org