Sign In  Sign Up Live-Chat

Problems with reading metafiles from Zip files

Last post 12-16-2007, 1:03 PM by msfaiz. 3 replies.
Sort Posts: Previous Next
  •  08-30-2007, 9:55 AM 92923

    Problems with reading metafiles from Zip files

    Hi,

    If I try to read a metafile from a zip file I got following exception.

    java.lang.OutOfMemoryError: Java heap space
        at com.aspose.metafiles.cU.do(SourceFile:771)
        at com.aspose.metafiles.EmfMetafile.do(SourceFile:60)
        at com.aspose.metafiles.EmfMetafile.<init>(SourceFile:38)
        at ZipTest.testZip

    Code:
    ZipFile zipFile = new ZipFile("test.zip");
    ZipEntry entry = zipFile.getEntry("test.emf");
    InputStream in = zipFile.getInputStream(entry);
    EmfMetafile metafile = new EmfMetafile(in);

    Raising the the maximum heap size doesn't help much.
    My assumption is that it has something to do how Metafiles reads the content from the InputStream. To prove it I used following workaround, which works.

    EmfMetafile metafile = new EmfMetafile(new BufferedInputStream(in));

    Best regards, Stephan Michels.

    Ps.: I will send the test files with an email.
     
  •  08-30-2007, 10:02 PM 93005 in reply to 92923

    Re: Problems with reading metafiles from Zip files

    Attachment: Present (inaccessible)

    Thank you, I got your .zip file. After little investigation, I will report it for a fix.

     

    For your smaller files, please don’t use www.yousendit.com , attach them with your post

     

    [Reply] -- > [Options] -- > [Add/Update]


    Many Thanks and Kind Regards,

    Shakeel Faiz
    Support Engineer
    Aspose Tyumen Team
     
  •  08-31-2007, 10:47 AM 93107 in reply to 92923

    Re: Problems with reading metafiles from Zip files

    I have reported it for a fix.


    Many Thanks and Kind Regards,

    Shakeel Faiz
    Support Engineer
    Aspose Tyumen Team
     
  •  12-16-2007, 1:03 PM 106354 in reply to 92923

    Re: Problems with reading metafiles from Zip files

    Dear tashiro,

     

    This bug has been fixed and latest version of Aspose.Metafiles 1.2.6.0 is available at this link.

    http://www.aspose.com/Community/Files/51/aspose.metafiles/default.aspx

     


    Many Thanks and Kind Regards,

    Shakeel Faiz
    Support Engineer
    Aspose Tyumen Team
     
View as RSS news feed in XML