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 3529A173AB for ; Tue, 14 Apr 2015 16:17:36 +0000 (UTC) Received: (qmail 37050 invoked by uid 500); 14 Apr 2015 16:17:36 -0000 Delivered-To: apmail-pdfbox-users-archive@pdfbox.apache.org Received: (qmail 37030 invoked by uid 500); 14 Apr 2015 16:17:36 -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 37018 invoked by uid 99); 14 Apr 2015 16:17:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Apr 2015 16:17:35 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE X-Spam-Check-By: apache.org Received-SPF: error (nike.apache.org: local policy) Received: from [81.169.146.161] (HELO mo4-p00-ob.smtp.rzone.de) (81.169.146.161) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Apr 2015 16:17:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1429028145; l=1625; s=domk; d=lehmi.de; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:References: Subject:To:MIME-Version:From:Date; bh=q2zJ4+G8G0b8faRQBA+IOH0+NSU1ZSW947O51dMsUNY=; b=nO7fmzsxVbgTC1jsYaW16gb0xK2T6q4PkvE328APyhXlde4trO/rRbC0G71nnNSbMVU aqIsCiwtfm9dN57BSF0F7D63IQerYgJ6qP5pw7M6PfL0OiY4b37MyO6zY9tk8BXqI/Cmm 1KOHZBpIUkkBimnxjjxtJpxFmqd9d9/nZNI= X-RZG-AUTH: :LWIAZ0WpaN8UY5o8XRz0jOyrHsdEC+nAE10OdySrgHL6ku8U1wNegRZKW1ja X-RZG-CLASS-ID: mo00 Received: from [192.168.1.8] (dslb-088-076-140-248.088.076.pools.vodafone-ip.de [88.76.140.248]) by smtp.strato.de (RZmta 37.5 DYNA|AUTH) with ESMTPSA id u06ff4r3EGFj3nL (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate) for ; Tue, 14 Apr 2015 18:15:45 +0200 (CEST) Message-ID: <552D3D31.4030901@lehmi.de> Date: Tue, 14 Apr 2015 18:15:45 +0200 From: Andreas Lehmkuehler User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: users@pdfbox.apache.org Subject: Re: Adding annotations from XFDF file to PDF document References: In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, Am 14.04.2015 um 15:06 schrieb Johanneke Lamberink: > Hi, > > As part of a bigger application, I am trying to use PDFBox to combine a separate XFDF file containing annotations with a PDF document. The result should be a PDF document with annotations. > > Unless I'm mistaken, PDFBox has no support for parsing XFDF annotations at this time. Are there any plans to implement this? > In an attempt to implement it myself, I have been parsing the XFDF file to create FDFAnnotation objects and then using those FDFAnnotation objects to create PDAnnotation objects. So far so good. However, the FDFAnnotation class and it's various subclasses for different annotations do not support the attributes that are required for specific annotations. > A result of this is that I have to parse String input to PDFont and PDColorspace objects (for example), and I can't discover how to do this. > > For now, I have 3 questions: > > * how do I create a PDFont object from (for example) "/Helvetica 18 Tf" > * how do I create a PDColorSpace object from (for example) "0.000 0.000 0.000 rg" > * What are your suggestions for continuing with my project. Continue working on my own solution, or implement support for XFDF annotations in PDFBox? Is anyone already working on this? > > Any help is greatly appreciated :) I'm not a XFDF expert, but did you ever give org.apache.pdfbox.tools.ImportXFDF a try? Maybe that's the missing piece you are looking for ... P.S.: You should use the current trunk due to some recent improvements trageting that specific area. > Johanneke Lamberink BR Andreas Lehmk�hler --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org For additional commands, e-mail: users-help@pdfbox.apache.org