Sign In  Sign Up Live-Chat

ExportXml Problem

Last post 11-17-2008, 6:44 AM by lukeyoyo. 8 replies.
Sort Posts: Previous Next
  •  05-08-2008, 10:03 AM 126046

    ExportXml Problem

    Just a quick question, does this method exclusively close the stream passed to it?  I tried passing a newly allocated memory stream to it and immediately after the ExportXml call I can not access my stream.  The difference between mine and the example is that I use a MemoryStream instead of a FileStream.  Any suggestions?
     
  •  05-08-2008, 7:09 PM 126117 in reply to 126046

    Re: ExportXml Problem

    Dear BCS,

    Thanks for considering Aspose.Pdf.Kit.

    Form.ExportXml doesnot close the stream passed to it. User should close it outside himself. If the problem remains, please attach your code as well as resources, so we can check it for you.

    Best regards.


    Luke Fu
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  11-05-2008, 9:49 AM 151159 in reply to 126046

    Re: ExportXml Problem

    Hi,

    I am facing exactly the same problem. Here is my code:

    FileStream inputStream = new FileStream(this.textBox1.Text, FileMode.Open);
    try
    {
    Stream outputStream = new MemoryStream();
    AsposeUtils myAsposeUtil = new AsposeUtils();
    myAsposeUtil.exportFormData(inputStream, outputStream);

    outputStream.Position = 0;
    }
    catch (System.Exception ee)
    {
    Console.WriteLine(ee.Message);
    }
    While AsposeUtils is defined as:

        public class AsposeUtils
        {
            public void exportFormData(Stream inStream, Stream outStream)
            {
                //Assign an input PDF document whose contents are needed to export
                Aspose.Pdf.Kit.Form form = new Aspose.Pdf.Kit.Form(inStream);
                //Export the values of all PDF form fields to the XML data file
                form.ExportXml(outStream);
            }
        }


    The code throws an ObjectDisposedException.

    Is this a problem of my code or of Pdf.Kit.Form.ExportXml? Please help.

    UAE
     
  •  11-05-2008, 4:19 PM 151198 in reply to 151159

    Re: ExportXml Problem

    Hi,

    Thanks for considering Aspose.

    I have tested the scenario and have gone through the code snippet, its working fine. Please share the resource file so that we can test the issue at our end.


    Nayyer Shahbaz
    Support Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  11-13-2008, 9:12 AM 152441 in reply to 151198

    Re: ExportXml Problem

    Attachment: Present (inaccessible)
    Hi,

    thanks for your reply and sorry for my hanging behind.

    Attached you can find a small project (Visual Studio 2005), which uses the code of my former post to export the form data into a memory stream. To demonstrate the problem with the memstream I am using the call to the postion attribute of the stream. On my system it is throwing an exception as described before.

    UAE
     
     
  •  11-13-2008, 2:12 PM 152483 in reply to 152441

    Re: ExportXml Problem

    Hi,

     

    I have tested the project that you have shared and I am unable to notice the problem. Please share the pdf files, that you are using, so that we can try extracting the contents from them.


    Nayyer Shahbaz
    Support Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  11-14-2008, 2:27 AM 152576 in reply to 152483

    Re: ExportXml Problem

    Attachment: Present (inaccessible)
    Hi,

    here is my sample.

    Actually, running the project above does not exit with any fatal error because of the exception handling. The exception message becomes visible by debugging the code or writing the message to some label on the form.

    UAE
     
  •  11-14-2008, 4:59 AM 152605 in reply to 152576

    Re: ExportXml Problem

    Hi,

    I have again checked the code and have noticed the problem. Please spare us little time. We need to investigate this issue in detail. Soon you will be updated with the status of correction.

    We apologize for your inconvenience.


    Nayyer Shahbaz
    Support Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  11-17-2008, 6:44 AM 152888 in reply to 152605

    Re: ExportXml Problem

    Dear BCS,

    This problem was reproduced with your help. It was registered as PDFKITNET-6506 in our bug system. The ETA is about one week, and the hotfix is expected to included in the next version. Thanks for your patience.

    Best regards


    Luke Fu
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
View as RSS news feed in XML