Sign In  Sign Up Live-Chat

Populating checkboxes with AutoFiller

Last post 08-29-2008, 2:34 PM by Denver Mike. 8 replies.
Sort Posts: Previous Next
  •  07-08-2008, 2:29 PM 134806

    Populating checkboxes with AutoFiller

    Hello,

    I'm using AutoFiller to populate a PDF form, and it all works quite nicely but I'm having a little trouble with checkbox fields.  The problem is that if the data I'm using to populate the checkbox (so it's either checked or not checked) contains a space, the checkbox field doesn't work.  (It works fine if the data doesn't contain a space.)

    For example, say I have a checkbox field called:
    "OpportunityStatus" and the expression to evaluate is "Closed". 

    If my data table has:
    DataTable dt = new DataTable("Opportunities");
    dt.Columns.Add(new DataColumn("OpportunityStatus");
    DataRow dr = dt.NewRow();
    dr["OpportunityStatus"] = "Closed";

    When I use AutoFiller with this data and the field described, the checkbox will come out checked.

    If, however, I change the data to:
    dr["OpportunityStatus"] = "Closed Won", and make the corresponding change to the PDF form field (to evaluate to "Closed Won"), the checkbox field doesn't come out checked.

    Do you have a suggestion on how to get this to work?

    Thanks
    Mike
     
  •  07-09-2008, 3:40 PM 134961 in reply to 134806

    Re: Populating checkboxes with AutoFiller

    Hello Mike,

    Sorry for delay in response. I have checked the scenario and have discussed it with the development team. Soon you will be updated with the status. We apologies for the inconvenience.


    Nayyer Shahbaz
    Support Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  07-09-2008, 5:37 PM 134967 in reply to 134961

    Re: Populating checkboxes with AutoFiller

    Hello Mike,

    Thanks for considering our product.

    Please upload your resources so we can reproduce the problem and check it for you. If you don't want anybody else see it, my mailbox: luke.fu@aspose.com.

    Thx.


    Luke Fu
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  07-14-2008, 12:04 PM 135455 in reply to 134967

    Re: Populating checkboxes with AutoFiller

    Attachment: Present (inaccessible)
    Here you go, Luke.  I've attached the simple code and the PDF Template:


        protected void Button1_Click(object sender, EventArgs e)
        {
            DataTable dt = new DataTable("Projects");
            dt.Columns.Add(new DataColumn("Status"));
            dt.Columns.Add(new DataColumn("StatusWithSpace"));
            DataRow dr = dt.NewRow();
            dr["Status"] = "Active";
            dr["StatusWithSpace"] = "In Progress";
            dt.Rows.Add(dr);

            AutoFiller autoFiller = new AutoFiller();
            autoFiller.InputFileName = @"C:\Checkbox Template.pdf";
            autoFiller.OutputStream = Response.OutputStream;

            autoFiller.ImportDataTable(dt);
            autoFiller.Save();

        }
     
  •  07-15-2008, 9:30 PM 135665 in reply to 135455

    Re: Populating checkboxes with AutoFiller

    Dear Mike,

    This issue has been registered as [PDFKITNET-5534]. It will be resolved in two weeks.

    Best regards.


    Luke Fu
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  07-16-2008, 11:04 AM 135771 in reply to 135665

    Re: Populating checkboxes with AutoFiller

    Thanks Luke.  Looking forward to it.
     
  •  08-29-2008, 11:45 AM 141784 in reply to 135771

    Re: Populating checkboxes with AutoFiller

    Luke,

    It looks like the correction for this didn't make it into the new 3.2.0.0 version, right?  I didn't try it, but I don't see it listed in the Revision History.  Any news on this?

    Mike
     
  •  08-29-2008, 2:23 PM 141801 in reply to 141784

    Re: Populating checkboxes with AutoFiller

    Hello Mike,

    I am pleased to inform you that PDFKITNET-5534 has been resolved in Aspose.Pdf.Kit v3.2.0.0. You can test it using the code snippet and the pdf file that you have shared with in this thread.

    In case of any further issues, please feel free to share.


    Nayyer Shahbaz
    Support Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  08-29-2008, 2:34 PM 141803 in reply to 141801

    Re: Populating checkboxes with AutoFiller

    That's great news... many thanks.

    Mike
     
View as RSS news feed in XML