Sign In  Sign Up Live-Chat

Multiple occurance of same field name does not get filled on merge

Last post 07-25-2008, 12:27 PM by mpetit. 11 replies.
Sort Posts: Previous Next
  •  06-03-2008, 3:05 PM 129892

    Multiple occurance of same field name does not get filled on merge

    Attachment: Present (inaccessible)

    I have PDF documents that have been created with formfields where the fieldnames match a legacy form engine (basically all numbers).  The form I'm testing with is a generic check form with the data being supplied from an xml doc.

    I'm following your sample code as follows:

    string path = MapPath(".");

    path = path.Substring(0, path.LastIndexOf("\\"));

    string param = this.Request.Params[0];

    string templatePdf;

    templatePdf = path + @".\Resources\GENCHK.pdf";

    string xml = path + @".\Resources\GENCHK.xml";

    Response.AddHeader("content-disposition", "inline; filename=" + "GenCheckOut.pdf");

    Response.ContentType = "application/pdf";

    FormDemos.ImportXml(templatePdf, xml, Response.OutputStream);

    Response.Flush();

    Response.End();

    public static void ImportXml(string templatePdf, string xml, System.IO.Stream outputStream)

    {

    //Assign an input pdf file.

    Form form = new Form(templatePdf, outputStream);

    //Open an existed fdf file.

    System.IO.FileStream xmlInputStream = new FileStream(xml, FileMode.Open);

     

    //Export all the pdf fields' value into the fdf file.

    form.ImportXml(xmlInputStream);

    form.Save();

    xmlInputStream.Close();

    }

    I'm running the trial version of pdf.kit 3.1.  If you run the attached files, the 2nd address line on the 2nd agent does not display.  Interestingly, if I omit the field name that corresponds to it (802), the city state zip line of the address does not display on the first agent.

    I've checked out the form field definitions in adobe and they appear to be correct to me.

    Can you review to see if this is a bug?

    Thanks.

    Mark

     
  •  06-03-2008, 4:35 PM 129901 in reply to 129892

    Re: Multiple occurance of same field name does not get filled on merge

    Hello Mark,

    Thanks for considering Aspose.Pdf.Kit

    We are looking into this matter and shortly we will update you over this.


    Nayyer Shahbaz
    Support Developer
    Aspose Changsha Team
    About Us
     
  •  06-03-2008, 7:12 PM 129918 in reply to 129901

    Re: Multiple occurance of same field name does not get filled on merge

    Dear Mark,

    Thanks for considering Aspose.Pdf.Kit.

    Without the template file GENCHK.pdf, I cannot reproduce the problem. Please upload it if not violating your pravicy.

    Anyway, we investigated into the xml document and found something different. Actually, Form.ImportXml( ) need a "compact" xml format like this:

    <fields>
        <831>James Doogan</831>
        <801>1 Main St</801>
        <802>#45A</802>

    ...
    </fields>

    This was designed to accord with the Adobe product function.

    You should transform your xml file to this format before importing it. And we will also discuss to decide whether to support your format or not.

    Best regards.


    Luke Fu
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  06-03-2008, 7:31 PM 129920 in reply to 129918

    Re: Multiple occurance of same field name does not get filled on merge

    Dear Mark,

    I am sorry to inform you that we won't support your format in particular. There are two ways to go:

    1. use XSLT to convert your format;
    2. try another method Form.ImportXfdf(), you'd better rename your xml file as GENCHK.xfdf.

    We still need the PDF template GENCHK.pdf to reproduce the duplicated field name problem. Thanks.


    Luke Fu
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  06-06-2008, 8:58 AM 130354 in reply to 129920

    Re: Multiple occurance of same field name does not get filled on merge

    Attachment: Present (inaccessible)

    I took the format for my xml file from your sample shipped with the demo called student.xml :

    <?xml version="1.0" encoding="utf-8"?><fields><field name="Telephone"><value>888.277.6734</value></field><field name="Grade"><value>GradeTwo</value></field><field name="Name"><value>Mike</value></field><field name="Lodging"><value>Off</value></field><field name="Gender"><value>Male</value></field><field name="Address"><value>41, Lily Street, Hurstville, NSW, 2220 Australia </value></field></fields>

    I have no problem going with the other format and will try that today.

    Regarding genchk.pdf, I thought I uploaded that in the original post...at any rate, it's attached here again.

    thanks. mark

     
  •  06-06-2008, 9:12 AM 130358 in reply to 130354

    Re: Multiple occurance of same field name does not get filled on merge

    Hello Mark,

    Thanks for considering Aspose.Pdf.Kit

    We have got the file and we will try to reproduce the duplicated field name problem and will let you update with the status, shortly.


    Nayyer Shahbaz
    Support Developer
    Aspose Changsha Team
    About Us
     
  •  06-06-2008, 9:15 AM 130360 in reply to 129920

    Re: Multiple occurance of same field name does not get filled on merge

    I just tried your condensed format.  It doesn't work with my field names because xml does not allow a tag name to start with a number.  Also, clearly pdf kit does support my original format because the sample code you shipped runs with that format as I showed in my previous replay.  It also "works" with my Genchk.pdf form...with the exception of the missing field merge issue I described in the post.

    Hopefully, you now have the genchk.pdf file from the previous reply. 

    Thanks you for you help.

     
  •  06-06-2008, 8:17 PM 130429 in reply to 130360

    Re: Multiple occurance of same field name does not get filled on merge

    Dear mpetit,

    Thanks for your kindly help that the problem has reproduced and registed as PDFKITNET-5281. The missed field error will be solved in one week.

    Besides, those fields with the same field name is filled with one value at the same time, and this is the normal action.

    Best regards.


    Luke Fu
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  06-10-2008, 10:27 AM 130797 in reply to 130429

    Re: Multiple occurance of same field name does not get filled on merge

    Dear mpetit,

    I am glad to inform you that this problem has been solved. Now Form supports both regular XML format (as you provided) and compact format (as I described).  It will be included in the next version, which is expected to be released before the end of the month.

    Thanks for your patience & Best regards.


    Luke Fu
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  07-03-2008, 1:24 PM 134230 in reply to 130797

    Re: Multiple occurance of same field name does not get filled on merge

    According to the last post, the fix for this problem was due to be released by the end of June '08.  I just checked the download page and the most recent build is still the 3.1 from 5/16.

    Is there an update on when the fix will be released?

     
  •  07-03-2008, 7:54 PM 134270 in reply to 134230

    Re: Multiple occurance of same field name does not get filled on merge

    Attachment: Present (inaccessible)

    Hi Mark,

    Sorry for that the release will be delayed. Please download the attachment and try it.

    Thanks,


    Felix Liu
    Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  07-25-2008, 12:27 PM 136983 in reply to 134270

    Re: Multiple occurance of same field name does not get filled on merge

    This appears to fix the problem.  I'm going to continue testing the product now.

    Thanks.

    Mark

     
View as RSS news feed in XML