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 1C26F17355 for ; Sat, 4 Oct 2014 11:40:06 +0000 (UTC) Received: (qmail 30343 invoked by uid 500); 4 Oct 2014 11:40:05 -0000 Delivered-To: apmail-pdfbox-users-archive@pdfbox.apache.org Received: (qmail 30317 invoked by uid 500); 4 Oct 2014 11:40:05 -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 30305 invoked by uid 99); 4 Oct 2014 11:40:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Oct 2014 11:40:05 +0000 X-ASF-Spam-Status: No, hits=1.8 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_FILL_THIS_FORM_SHORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of andrewlee2000@gmail.com designates 209.85.216.179 as permitted sender) Received: from [209.85.216.179] (HELO mail-qc0-f179.google.com) (209.85.216.179) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Oct 2014 11:39:59 +0000 Received: by mail-qc0-f179.google.com with SMTP id x3so2121046qcv.24 for ; Sat, 04 Oct 2014 04:39:38 -0700 (PDT) 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=1hqZvufguV4WbRQQNmhaAep8FMykvo95rKA7kS+t2PE=; b=yzYTitksuNt4tauhQJLOvLfVltLwWz5pEBZNvwBanh+OF2caqJNtKs6BUKeoKUIuut cUTyf6BGTzRNqW8B6ajQ1tBvH75CBwLsbfmxvh/0rBvIBDUHuc1P/sD2+GudMdvemAOZ jAxKuBVDIltGoh0L+tAPcusO55C7+4xHEMPZuVRiO5ondStU3uSV8FpmMEAoxCeq2rAh Jp+wKh56O1BTtQ1uefvxhDkgqtYtYdN4VfCX09cAUOmMaLCy/J6cb6oNiUycK6RvPYbY 13tcDgbk6wPgTaZDwKYoyJBc5fnz88FU5z+1uZNTgGJcJRwloO/LX3Ktmu/A0kYnkvhX GlZA== MIME-Version: 1.0 X-Received: by 10.140.42.68 with SMTP id b62mr9568254qga.25.1412422778764; Sat, 04 Oct 2014 04:39:38 -0700 (PDT) Received: by 10.140.16.233 with HTTP; Sat, 4 Oct 2014 04:39:38 -0700 (PDT) In-Reply-To: References: <542FCD93.1060907@t-online.de> Date: Sat, 4 Oct 2014 19:39:38 +0800 Message-ID: Subject: Re: How to find and replace text in pdf report From: andrew lee To: users@pdfbox.apache.org Content-Type: multipart/alternative; boundary=001a11c12d2800449f0504974ea3 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c12d2800449f0504974ea3 Content-Type: text/plain; charset=UTF-8 Hi Tilman; My typo mistake, i mean PDFBox, not iText. However it will be great if iText work as well. tq regards; andrew On Sat, Oct 4, 2014 at 7:38 PM, andrew lee wrote: > Hi Tilman; > Thanks for the advice. If you notice my attached file, the Account Number: > 0123456789 location will be fixed on every report. > Does this mean PDFTextStripperByArea will be able to read it? > > What if the [First Name], [Last Name] & [Address] is an editable field. > Will iText be able to fill them will information that I obtain from a > database? > > Thanks; > andrew > > On Sat, Oct 4, 2014 at 6:36 PM, Tilman Hausherr > wrote: > >> Hi, >> >> reading an area can be done with PDFTextStripperByArea, see in the source >> code or in stackoverflow for examples. If you know where it is. If you >> don't know where it is (e.g. invoice processing), then you'll have to guess >> by the context. >> >> Writing at a placeholder is more difficult. Better don't create the >> placeholder at all, just find out the coordinates and draw your text. >> >> https://pdfbox.apache.org/cookbook/documentcreation.html >> >> Tilman >> >> >> >> Am 04.10.2014 um 03:28 schrieb andrew lee: >> >> Hi; >>> I have a pdf report as per attached file. It contains the following text. >>> Account Number: 0123456789 >>> [First Name] >>> [Last Name] >>> [Address] >>> >>> Using PDFBOX, can I read the Account Number value "0123456789" so that i >>> can cross check with my oracle database, select out the First Name, Last >>> Name and Address and finally fill it into the marker [First Name], [Last >>> Name] & [Address] in the PDF file. Btw i was told that i will be given an >>> editable pdf report. also >>> >>> >>> Kindly advice. tq >>> >> >> > --001a11c12d2800449f0504974ea3--