pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Kaufman <m...@eeph.com>
Subject Re: Fillable Field in PDF
Date Mon, 26 Mar 2018 19:32:35 GMT
The UR3 indicates that the file is "Reader Enabled", so has an RE 
signature. It is also encrypted. The Save parameters called for the file 
to be saved as unencrypted, and not as an incremental save, which would 
break the RE signature. Removing the UR3 removes the check for Reader 
Enablement.

Marc


On 3/26/2018 11:54 AM, JZ Q wrote:
> Thank you so much, Tilman. It works.
>
> On Mon, Mar 26, 2018 at 2:50 PM, Tilman Hausherr 
> <THausherr@t-online.de <mailto:THausherr@t-online.de>> wrote:
>
>     Hi,
>
>     Yeah, I got this message:
>
>
>     Please try this before saving:
>
>     ((COSDictionary)pdfTemplate.getDocumentCatalog().getCOSObject().getDictionaryObject(COSName.PERMS)).removeItem(COSName.getPDFName("UR3"));
>
>     The code above doesn't do null checks etc, so you may want to
>     change that. But it removes the usage rights. I don't know if this
>     is a good idea, but it does what you asked for.
>
>     Tilman
>
>     Am 26.03.2018 um 15:29 schrieb JZ Q:
>>     Sorry, I wasn't aware the attached will be filter by this email list. Here
>>     is the link:
>>
>>     https://drive.google.com/file/d/15s-0P3y6dKN4wuvZc1ShYy_yUu-qitfV/view?usp=sharing
>>     <https://drive.google.com/file/d/15s-0P3y6dKN4wuvZc1ShYy_yUu-qitfV/view?usp=sharing>
>>
>>     Again, for such type of forms, if I use PDField.setValue(), then save it
>>     using the following statements, it becomes READY-ONLY document. I prefer
>>     the program to give the initial value only, then the resulting pdf is still
>>     editable by users. Any feedback is really appreciated as I have been
>>     working on it for a week without any progress. Thanks.
>>
>>     pdfTemplate.setAllSecurityToBeRemoved(true);
>>          pdfTemplate.save(output_file);
>>
>>     On Mon, Mar 26, 2018 at 2:49 AM, Tilman Hausherr<THausherr@t-online.de>
<mailto:THausherr@t-online.de>
>>     wrote:
>>
>>>     Am 26.03.2018 um 03:00 schrieb JZ Q:
>>>
>>>>     I have attached the form for your reference
>>>>
>>>     These don't get passed. Please upload the PDF to a public location.
>>>
>>>     Tilman
>>>
>>>
>>>     ---------------------------------------------------------------------
>>>     To unsubscribe, e-mail:users-unsubscribe@pdfbox.apache.org
>>>     <mailto:users-unsubscribe@pdfbox.apache.org>
>>>     For additional commands, e-mail:users-help@pdfbox.apache.org <mailto:users-help@pdfbox.apache.org>
>>>
>>>
>
>
>
>
> -- 
> Best Wishes,
> Jason


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message