Sign UpSign Up   Sign InSign In Welcome Guest,
Live Chat Live Chat

Generate not Editable PDF after FillFields

Last post 03-24-2009, 11:30 PM by forever. 8 replies.
Sort Posts: Previous Next
  •  10-31-2008, 3:19 PM 150474

    Generate not Editable PDF after FillFields

    I used Adobe Designer 7.0 to produce a Form (pdf) with Text and Image Fields e CodBar Field.

    Using the DemoWebForm supplied, I modified the FillFields call to use my Form.

    #1 - How I can obtain a PDF not Editable after use FORM.Save() ?

    I Marked Text fields as Read Only - OK, but the ImageField cannot be marked as ReadOnly and continue alow editing.

    #2 - The CodBar field, after marked as ReadOnly, don't show bars. Why?

    #3 - Is the Adobe Designer best choice to produce Forms ?


    Filed under: Aspose.Pdf.Kit
     
  •  10-31-2008, 6:44 PM 150508 in reply to 150474

    Re: Generate not Editable PDF after FillFields

    Hello Luiz Fernando,

    Thanks for considering Aspose.

    #1) How to obtain Pdf not editable, you can set Privileges over Pdf document. Please visit Set Privileges on PDF Document

    #2) after the CodaBar marked as read only, don’t show Bars, I am not sure why you are facing this problem. Could you please elaborate it, how you are making it read only, through Adobe Designer or using code snippet.

    #3) We have a component named Aspose.Pdf which can be used to generate Pdf forms. For more information please visit Manipulating Form Fields. You can also use Aspose.Pdf.Kit to create Pdf forms. For more information please visit How to Create and Decorate Form Fields With API?.

    Please also visit Change Form Field Attributes it contains information on how to set the form field attributes to prevent the user from changing the value of the field.

    Please visit Aspose.Pdf vs. Aspose.Pdf.Kit in order to have clear understating of both the products.


    Nayyer Shahbaz
    Support Developer, Aspose Sialkot Team
    About Us
    Contact Us

    Keep in touch! We're on Twitter and Facebook
     
  •  10-31-2008, 7:41 PM 150515 in reply to 150508

    Re: Generate not Editable PDF after FillFields

    Dear Fernando,

    Thanks for considering Aspose.Pdf.Kit. I would like to add some more comments about your questions.

    For #1, you can invoke Form.FlattenField(String fieldName) to make specific field un-editable, or Form.FlattenAllFields() to make all fields un-editable.

    For #2, I am not sure about the "Codbar Field", is it the mis-spelling of "Codabar Field"? If so, what's the operation to get it un-editable? If possible, please provide the code as well as resources.

    For #3, as codewarior said, Aspose.Pdf can generate PDF documents containing forms from scratch, while Aspose.Pdf.Kit can modify/add fields on the basic of existing PDF templates.

    Best regards.


    Luke Fu
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  11-03-2008, 7:06 AM 150654 in reply to 150515

    Re: Generate not Editable PDF after FillFields

    Attachment: Present (inaccessible)
    for #2 - The field is typed as 'BarCode' in Adobe Design.
    - When I use Form.FlattenAllFields() the image of BarCode does not show - only the numbers are showed.
    - But, if I don't use Form.FlattenAllFields(), the image is showed.

    For my application, I need use Form.FlattenAllFields().

    Following the Form 'test.pdf' I used.
     
  •  11-03-2008, 3:05 PM 150737 in reply to 150654

    Re: Generate not Editable PDF after FillFields

    Dear Fernando,

    Thanks for sharing the resource pdf file.

    In order for us to test the issue, we need to fill in the form fields, but before we proceed with this operation, we must know the form field names. Currently I am not sure, what name you have used for the form fields. Please share to project that you are using, so that we can test the issue at our end.


    Nayyer Shahbaz
    Support Developer, Aspose Sialkot Team
    About Us
    Contact Us

    Keep in touch! We're on Twitter and Facebook
     
  •  11-04-2008, 12:11 PM 150948 in reply to 150737

    Re: Generate not Editable PDF after FillFields

    ...
    public static void FillFields(string path, string templatePdf, System.IO.Stream outputStream)
    {
    Form form = new Form(templatePdf, outputStream);
    form.FillField("Inscricao","910029992");
    form.FillField("Nat","2");
    form.FillField("Valor","8277673.45");
    form.FillField("texto","41, Lily Street, Hurstville, NSW, 2220 Australia \nNova linha de texto contento nova linha de texto\n\nnova linha");
    form.FillBarcodeField("form1[0].sub1[0].codBarra[0]", "1234567890");
    form.FillImageField("LogoPM",path + @".\Resources\lovely.jpg");

    form.FlattenAllFields();

    form.Save();

    }
    ...
     
  •  11-04-2008, 4:34 PM 151006 in reply to 150948

    Re: Generate not Editable PDF after FillFields

    Dear Fernando,

    I have tested the issue and I am able to notice the same problems. We are looking into the detail of this issue and soon you will be updated with the status of correction.

    We apologize for your inconvenience.


    Nayyer Shahbaz
    Support Developer, Aspose Sialkot Team
    About Us
    Contact Us

    Keep in touch! We're on Twitter and Facebook
     
  •  11-05-2008, 8:28 PM 151219 in reply to 150515

    Re: Generate not Editable PDF after FillFields

    Dear Fernando,

    Thanks for your resources.

    I am sorry to inform you that Aspose.Pdf.Kit cannot flatten barcode fields in XfaForm correctly. The appearance of barcode fields are generated by PDF Reader automatically, which is not embeded in the document.

    A workround solution is to set the field as ReadOnly, which can also turn it un-editable. If  you can accept this alternative, we will add the feature into our product.

    Hope for your message & Best regards.


    Luke Fu
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  03-24-2009, 11:30 PM 171370 in reply to 150474

    Re: Generate not Editable PDF after FillFields

    The issues you have found earlier (filed as 6419) have been fixed in this update.


    This message was posted using Notification2Forum from Downloads module by forever.
     
View as RSS news feed in XML