You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2017/09/09 12:47:00 UTC

[jira] [Resolved] (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:all-tabpanel ]

Tilman Hausherr resolved PDFBOX-3929.
-------------------------------------
       Resolution: Fixed
         Assignee: Tilman Hausherr
    Fix Version/s: 3.0.0
                   2.0.8

> 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
>            Assignee: Tilman Hausherr
>             Fix For: 2.0.8, 3.0.0
>
>         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