Skip to content

Commit

Permalink
Parse size for ODT as point unit
Browse files Browse the repository at this point in the history
  • Loading branch information
VladFlorinIlie committed Aug 29, 2022
1 parent ec6022f commit efb936d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public Float getSize( String sizeAsDxa )

//TODO parse string containing unit information like "0.582cm"
try{
float sizeAsPixel = Float.parseFloat(sizeAsDxa);
float sizeAsPixel = Float.parseFloat(sizeAsDxa.split(POINT_UNIT)[0]);
sizeAsPixel = (sizeAsPixel / 0.75f) ;
return Float.valueOf(sizeAsPixel);
}catch(NumberFormatException e){
Expand Down

0 comments on commit efb936d

Please sign in to comment.