You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "John Hewson (JIRA)" <ji...@apache.org> on 2014/10/11 00:27:34 UTC

[jira] [Closed] (PDFBOX-97) error extracting fields from pdf with usage rights.

     [ https://issues.apache.org/jira/browse/PDFBOX-97?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Hewson closed PDFBOX-97.
-----------------------------
    Resolution: Cannot Reproduce

> error extracting fields from pdf with usage rights.
> ---------------------------------------------------
>
>                 Key: PDFBOX-97
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-97
>             Project: PDFBox
>          Issue Type: Bug
>          Components: AcroForm, Signing
>
> [imported from SourceForge]
> http://sourceforge.net/tracker/index.php?group_id=78314&atid=552832&aid=1305400
> Originally submitted by benlitchfield on 2005-09-26 18:55.
> See: usage_rights_form.pdf
> this is my scenario: 
> 1. I create form with Adobe Form Designer (included in 
> Acrobat Professional 7). 
> The form is complex and has lots of JavaScript to 
> validate, change, and even dynamically fill data from 
> remote Web Service! 
> 2. Then I add usage rights with Reader Extension 
> Server, so that the form can be signed with digital 
> signature with the free version of Reader 
> 3. Then, place the PDF form file on a WEB server (ex. 
> Apache) and "give" it to the users :) 
>  
> So far, so good! When a user fills in the form fields, he 
> or she submits the whole PDF file back to a server 
> application for further processing. In my case this app is 
> a Java Servlet. 
>  
> What I need is to extract all the fields from the pdf file 
> including the digital signature. 
> I know that this has been discussed already, BUT the 
> simple code does not work. I suppose that the problem 
> is with the output pdf file from Form Designer. 
> The "not working part" is this: 
>  
> PDDocument pdfDocument = PDDocument.load
> (pdfFile); 
> PDAcroForm form = pdfDocument.getDocumentCatalog
> ().getAcroForm(); 
> List flist = form.getFields(); 
>  
> Here in "flist" I get a single element which is null. 
> -----------------------------------------
> Hi, again. I was on a travel so the "pdf problem" was off 
> for a while, but now it is up and bugging me again. 
> Here is what I got: I have a form designed with Designer 
> 7, which has a button of type "submit pdf". This is 
> because the form has a digital signature field and if I 
> choose "submit xml" the Sig filed is not submited. The 
> submit action is to a Java servlet where I dump the byte 
> stream to a file. 
> What I would like to do is get the data from each field 
> including the digital signature so I can validate it. The 
> PrintFields example works as long as the form is NOT 
> signed. In my case I could get the form structure but all 
> the fields (filed.getValue() or field.toString()) are null, and 
> on the digital signature the is nothing in the COS 
> dictionary about certificate or something. 
> -------------------------------------------------------------------
> Hello, I found where is the problem. When I sign and 
> save the document in pdf-1.6 format in the raw pdf file I 
> get 3 pdf forms. I guess history changes are also saved. 
> The first form is blank (fields/textboxes are blank/null), 
> the second is with values and the digital signature and 
> the third is the same as the second one but is saved 
> because (I guess again) the Submit button was pressed 
> and this is a change. 
> As I looked at the code of PDFBox more careful I 
> supose that the pdf box gets the first form only which in 
> my case is blank.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)