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

Can't get ImportXml() to work

Last post 02-17-2011, 1:19 AM by shahzad.latif. 33 replies.
Page 1 of 3 (34 items)   1 2 3 Next >
Sort Posts: Previous Next
  •  03-09-2009, 11:00 PM 168962

    Can't get ImportXml() to work .NET

    Attachment: Present (inaccessible)

    Hello,

     

    I've been trying to use ImportXml() but I can't get it to work.. The output PDF doesn't contain the xml I tried to import.

    I created a simple form / simple schema (attached) and used code based on code specified in another thread http://www.aspose.com/community/forums/thread/141629/xml-export-ok-gt-xml-import-not-ok.aspx:

     

    //Export
    PdfKit.Form form1 = new PdfKit.Form(Path.Combine(tempDirectoryPath, "xml.pdf"));
    System.IO.FileStream xmlOutputStream = new FileStream(Path.Combine(tempDirectoryPath, "xmltest.xml"), FileMode.Create);
    form1.ExportXml(xmlOutputStream);
    xmlOutputStream.Close();

    //Import
    PdfKit.Form form2 = new PdfKit.Form(Path.Combine(tempDirectoryPath, "xmltemplate.pdf"), Path.Combine(tempDirectoryPath, "xmlfilled.pdf"));
    System.IO.FileStream xmlInputStream = new FileStream(Path.Combine(tempDirectoryPath, "xmltest.xml"), FileMode.Open);
    form2.ImportXml(xmlInputStream);
    xmlInputStream.Close();
    form2.Save();

     

    Am I missing something...?

    Any help would be much appreciated.

     

    NB: Am using version 3.3.0.0

     

    Thanks!

     

     
  •  03-10-2009, 1:32 AM 168975 in reply to 168962

    Re: Can't get ImportXml() to work

    Hi,

    Thank you very much for considering Aspose.

    I'm looking into the matter and will update you with the results the earliest possible.

    We really appreciate your patience.

    Regards,

     


    Shahzad Latif - [Follow me on Twitter!]
    Support Developer/Developer Evangelist
    Aspose Sialkot Team
    Aspose - Your File Format Experts

    Keep in touch! We're on Twitter and Facebook
     
  •  03-11-2009, 10:38 PM 169352 in reply to 168975

    Re: Can't get ImportXml() to work

    Additional info:

    Tried it with version 3.3.0.0 and version 3.2.0.0 - doesn't work with either.

    The forms I've got were created using Adobe Livecycle; and are bound to schemas... I noticed that the form in the thread I mentioned in my previous post, and the form in the Aspose.Pdf.Kit C# Demos package both do not use schemas... Could this have something to do with it?

    Edit: Just checked, schema doesn't seem to be an issue - doesn't work with a simple form not bound to a schema either ..

    I really don't know what I'm doing wrong T_T Any thoughts/comments/advice would be muchly appreciated,

    Thanks~

     
  •  03-12-2009, 1:20 AM 169372 in reply to 169352

    Re: Can't get ImportXml() to work

    Hi,

    Thanks for the detailed information. We're still looking into the matter. I have also contacted our development team to look into this issue. I'll update you with the results as we find some resolution.

    We really appreciate your patience.

    Regards,

     


    Shahzad Latif - [Follow me on Twitter!]
    Support Developer/Developer Evangelist
    Aspose Sialkot Team
    Aspose - Your File Format Experts

    Keep in touch! We're on Twitter and Facebook
     
  •  03-13-2009, 12:39 AM 169551 in reply to 169372

    Re: Can't get ImportXml() to work

    Dear Carandang ,

    Thanks for considering Aspose.Pdf.Kit.

    Your problem has been reproduced on our platform, and we found the reason. It is because of the feature of 'data binding' adopted in your PDF documents. Till now, this feature cannot be supported by Kit.

    We are considering to provide new support for this feature in our next plan. But I am afraid it will cost several weeks. Once it finished, I will inform you in this feature.

    Sorry for the inconvenience & Best regards. 

     


    Luke Fu
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  06-24-2009, 12:18 AM 185211 in reply to 169551

    Re: Can't get ImportXml() to work

    Hello,

     

    I'd just like to follow up on this; how is the development progressing for this feature?

     

    Thanks!

     
  •  06-24-2009, 1:54 AM 185220 in reply to 185211

    Re: Can't get ImportXml() to work

    Dear customer,

    Sorry for the late reply.

    In fact, this feature has been solved and submitted. But for some technical reasons, a formal release has not been published in the past month. Before that, please download a trial version from here and have a try.

    Best regards.


    Luke Fu
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  06-25-2009, 7:30 PM 185536 in reply to 185220

    Re: Can't get ImportXml() to work

    Thanks for your quick response~

     

    However, clicking on the link you given me gives me the error message "Access Denied - You do not have permissions to perform the requested action."

     
  •  06-25-2009, 11:01 PM 185543 in reply to 185536

    Re: Can't get ImportXml() to work

    Attachment: Present (inaccessible)

    That post was kept as secret. Please download and try it from here.

    Hope it help!


    Luke Fu
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  06-28-2009, 6:40 PM 185757 in reply to 185543

    Re: Can't get ImportXml() to work

    Attachment: Present (inaccessible)

    Hi,

     

    Thanks! It works now with some simple forms (like the one I attached to this thread earlier), but fails with some more complex forms. Gives me the following error message:

    Object reference not set to an instance of an object. : at xeb116a323308e2f7.xc19484cc31391ae1.setField(String name, String value_Renamed) at Aspose.Pdf.Kit.Form.xfe4e5a47d18d49df(XmlNode x57e9faf3ffdc07cc) at Aspose.Pdf.Kit.Form.xfe4e5a47d18d49df(XmlNode x57e9faf3ffdc07cc) at Aspose.Pdf.Kit.Form.xfe4e5a47d18d49df(XmlNode x57e9faf3ffdc07cc) at Aspose.Pdf.Kit.Form.ImportXml(Stream inputXmlStream) at GrantEd.DomainModel.Form.Renderers.PdfFormRenderer.AsposePrepopulateForm(Byte[] pdf, String formData) in C:\UserData\SEMISPT\DEV\Projects\Source\Development\Domain\Form\GrantEd.DomainModel.Form.Renderers\PdfFormRenderer.cs:line 66 at GrantEd.DomainModel.Form.Renderers.PdfFormRenderer.GetFormStream(String template, String formData, enumFormOperationModeCode operationMode) in ...

     

    Here's the code that I use:

    // Create Form object
    MemoryStream pdfStreamIn = new MemoryStream(pdf);
    MemoryStream pdfStreamOut = new MemoryStream();
    PdfKit.Form pdfForm = new PdfKit.Form(pdfStreamIn, pdfStreamOut);

    // Import form data xml
    byte[] f = Encoding.UTF8.GetBytes(formData);
    MemoryStream xmlInputStream = new MemoryStream(f);
    pdfForm.ImportXml(xmlInputStream);
    pdfForm.Save();
    pdfStreamOut.Seek(0, SeekOrigin.Begin);
    using (BinaryReader reader = new BinaryReader(pdfStreamOut))
    {
    return reader.ReadBytes((int)pdfStreamOut.Length);
    }

    I've attached the xml and the pdf template.

     

    Cheers,

    ~pxc

     
  •  06-28-2009, 8:30 PM 185765 in reply to 185757

    Re: Can't get ImportXml() to work

    I am sorry to hear that. Please share me more time to solve this issue. Once finished, I will inform you in this thread.

    Best regards.


    Luke Fu
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  07-05-2009, 4:02 AM 186899 in reply to 168962

    Re: Can't get ImportXml() to work

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


    This message was posted using Notification2Forum from Downloads module by aspose.notifier.
     
  •  07-09-2009, 8:57 AM 187745 in reply to 186899

    Re: Can't get ImportXml() to work

    Dear Carandang,

    I am afraid that the newest release cannot solve your problem either. Until now, Kit can handle those documents with 'data binding' feature. However, the document you provided requires the feature of dynamic forms.

    After careful investigation and manytesting, we found it was more complex than we expected before. I am afraid that it cannot be finished in a near future. This feature has been put into our long-term plan, but it cannot be achieved in several months.

    Sorry for the inconvenience. & Best regards. 


    Luke Fu
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  09-29-2009, 6:03 PM 200262 in reply to 187745

    Re: Can't get ImportXml() to work

    Hello,

    Just wondering - how far into the long-term plan has this feature been placed? May I know when this is estimated to be finished (or when the work on this is planned to start?)

    Thanks!

     
  •  09-30-2009, 10:09 AM 200410 in reply to 200262

    Re: Can't get ImportXml() to work

    Hi Carandang,

    Our team is working on this issue. I have contacted the development team and will share the updated status with you the earliest possible.

    Regards,


    Shahzad Latif - [Follow me on Twitter!]
    Support Developer/Developer Evangelist
    Aspose Sialkot Team
    Aspose - Your File Format Experts

    Keep in touch! We're on Twitter and Facebook
     
Page 1 of 3 (34 items)   1 2 3 Next >
View as RSS news feed in XML