[ 
https://issues.apache.org/jira/browse/PDFBOX-5194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17346574#comment-17346574
 ] 

Tilman Hausherr commented on PDFBOX-5194:
-----------------------------------------

I changed the local code (FontMapperImpl) to use MS-Gothic only and couldn't 
reproduce the effect. The problem in your file is that the calculated font size 
is 64.8584, but it should be 16.6882. What bounds do you get at
{code:java}
Rectangle2D bounds = PDType1Font.ZAPF_DINGBATS.getPath(name).getBounds2D(); 
{code}
I get
{code:java}
[x=34.0,y=-14.0,w=777.0,h=719.0] {code}
I also don't get the log message you mention. My file:
{code:java}
07.12.2019  11:08         8.990.160 msgothic.ttc {code}
another thing to try would be to remove the line
{code:java}
if (bounds.isEmpty()) {code}
this forces the usage of the AFM numbers, which are fixed.

> CreateCheckBox example draws too large, clipped checkmark
> ---------------------------------------------------------
>
>                 Key: PDFBOX-5194
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5194
>             Project: PDFBox
>          Issue Type: Bug
>          Components: AcroForm
>    Affects Versions: 2.0.23
>         Environment: Windows 10 64-bit with JRE 15
>            Reporter: Andreas Unterweger
>            Priority: Major
>         Attachments: .pdfbox.cache, CheckBoxSample.pdf, checkbox.PNG
>
>
> I am using the example code from CreateCheckBox of v2.0.23 to create a PDF 
> with a rendered checkbox 
> ([https://github.com/apache/pdfbox/blob/2.0.23/examples/src/main/java/org/apache/pdfbox/examples/interactive/form/CreateCheckBox.java]).
>  Regardless of whether I use the original code or change .unCheck() to 
> .check(), the checkmark drawn in the PDF (when the checkbox is checked) is 
> too large and gets clipped (see attached image).
> I tried the latest Adobe Reader version and other PDF viewers as well as 
> drawing into a different, pre-existing PDF document. The issue remains. In 
> case it is relevant, I receive the following output when executing the code:
> {{Mai 17, 2021 10:51:17 AM org.apache.fontbox.ttf.CmapSubtable 
> processSubtype14}}
>  {{WARNING: Format 14 cmap table is not supported and will be ignored}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org

Reply via email to