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 <[email protected] <mailto:[email protected]>> 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<[email protected]> 
<mailto:[email protected]>
    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:[email protected]
    <mailto:[email protected]>
    For additional commands, e-mail:[email protected] 
<mailto:[email protected]>






--
Best Wishes,
Jason

Reply via email to