You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2017/09/09 12:45:00 UTC
[jira] [Commented] (PDFBOX-3929) Border style dictionary width
ignored by Adobe Reader when float
[ https://issues.apache.org/jira/browse/PDFBOX-3929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16159923#comment-16159923 ]
ASF subversion and git services commented on PDFBOX-3929:
---------------------------------------------------------
Commit 1807889 from [~tilman] in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1807889 ]
PDFBOX-3929: assign floats with fractional part 0 as integer due to Adobe Reader bug
> Border style dictionary width ignored by Adobe Reader when float
> ----------------------------------------------------------------
>
> Key: PDFBOX-3929
> URL: https://issues.apache.org/jira/browse/PDFBOX-3929
> Project: PDFBox
> Issue Type: Bug
> Components: AcroForm
> Affects Versions: 2.0.7
> Reporter: Tilman Hausherr
> Attachments: BorderWidthTest3.0float.pdf, BorderWidthTest3int.pdf
>
>
> Text of bug report to adobe:
> {quote}
> Steps to reproduce bug:
> 1. Assign border style width 3.0 to each field widget with Apache PDFBox
> 2. Open PDF with Adobe Reader
> Results:
> Border is not of width 3
> Expected results:
> Border should be of width 3. However if the same is done programmatically with 3 as an integer (i.e. 3 instead of 3.0) it works. However the PDF 32000 specification clearly tells that the width in the border style dictionary is a "number". It does not request an integer. See Table 166 – Entries in a border style dictionary.
> Sadly I can attach only one file. Both files are also in this bug report:
> https://issues.apache.org/jira/browse/PDFBOX-3929
> The files are named
> BorderWidthTest3.0float.pdf (attach here too)
> and
> BorderWidthTest3int.pdf (displays correctly)
> {quote}
> I have observed this effect only for the attached file (from Garry Grosso in the user mailing list). The effect does *not* happen with Annotations.
> Code used:
> {code}
> PDDocument doc = PDDocument.load(new File("BorderWeightTest.pdf"));
> PDAcroForm acroForm = doc.getDocumentCatalog().getAcroForm();
> for (PDField field : acroForm.getFieldTree())
> {
> System.out.println(field);
> if (field instanceof PDTextField)
> {
> PDBorderStyleDictionary bs = new PDBorderStyleDictionary();
> bs.setWidth(3);
> ((PDTextField)field).getWidgets().get(0).setBorderStyle(bs);
> }
> }
>
> doc.save(new File("BorderWeightTest-new.pdf"));
> doc.close();
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org