You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2013/01/08 08:52:38 UTC

[Bug 54383] New: Can't determine picture size and scale

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: dev@poi.apache.org
          Reporter: fenyvesi.laszlo.78@gmail.com
    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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 54383] Can't determine picture size and scale

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54383

fenyvesi.laszlo.78@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from fenyvesi.laszlo.78@gmail.com ---
It is an MSWord document with one picture inserted from file (.jpg).

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org