https://issues.apache.org/bugzilla/show_bug.cgi?id=54383

            Bug ID: 54383
           Summary: Can't determine picture size and scale
           Product: POI
           Version: 3.9
          Hardware: PC
            Status: NEW
          Severity: critical
          Priority: P2
         Component: HWPF
          Assignee: [email protected]
          Reporter: [email protected]
    Classification: Unclassified

FileInputStream fis = new FileInputStream(docRealPath);
        HWPFDocument doc = new HWPFDocument(fis);
        Picture pic = doc.getPicturesTable().getAllPictures().get(0);

        pic.getWidth(); //gives -1
        pic.getHeight(); //gives -1
        pic.getVerticalScalingFactor() //NullPointerException at
org.apache.poi.hwpf.usermodel.Picture.getVerticalScalingFactor(Picture.java:491)
        pic.getHorizontalScalingFactor() //NullPointerException at
org.apache.poi.hwpf.usermodel.Picture.getHorizontalScalingFactor(Picture.java:429)
        pic.getDxaGoal() //NullPointerException at
org.apache.poi.hwpf.usermodel.Picture.getDxaGoal(Picture.java:378)
        pic.getDyaGoal() //NullPointerException at
org.apache.poi.hwpf.usermodel.Picture.getDyaGoal(Picture.java:407)




So I can't determine the size of the picture in the Word document. It is an
MSWord 97/2000/XP format.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to