GooDer commented on PR #183:
URL: https://github.com/apache/pdfbox/pull/183#issuecomment-1929170763

   Hello,
   
   I have encounter problem during flattening of one of our PDF. I think that 
main reason of failure is wrong usage of form field in the source PDF but I 
can’t change it (I think it was generated by some tool). I can’t also shared 
the problematic PDF since it contains sensitive data.
   
   During processing of flattening there is a method to calculate size of font 
for these dynamic form field and in this case it leads to division by zero 
float and ending as negative infinite.
   
   It is edge case but still I think it would be good to handle it.
   
   Element displayed in PDFBox debugger:
   
![image](https://github.com/apache/pdfbox/assets/953850/85e6384e-415f-46e1-86ac-c534897e5507)
   
   Values and place where problem happens in debugger:
   
![image](https://github.com/apache/pdfbox/assets/953850/b485116a-3775-47ce-850b-df6d0d7df994)
   
   I think that only height values should be taken into consideration in this 
case.
   
   Used PDFBox 3.0.1, java 17
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to