[
https://issues.apache.org/jira/browse/PDFBOX-1861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13880543#comment-13880543
]
John Hewson commented on PDFBOX-1861:
-------------------------------------
I've found the problem with the tracemonkey.pdf lines, PDFBox is trying to draw
a zero-width line, which Java treats as 1px but we should treat as an
implementation-specific minimum value, which is what Adobe Reader does.
First, in SetLineWidth#process the code:
{code}
if (lineWidth == 0)
{
lineWidth = 1;
}
{code}
should be removed because 0 is an acceptable value to be stored in the graphics
state.
Then add the following code to StrokePath#process, after the line width is
multiplied by the CTM:
{code}
// Adobe reader uses a similar minimum width
if (lineWidth < 0.25)
{
lineWidth = 0.25f;
}
{code}
This way the minimum line width we render is specific to the pagedrawer and not
the pdmodel.
> Line is incorrectly dashed
> --------------------------
>
> Key: PDFBOX-1861
> URL: https://issues.apache.org/jira/browse/PDFBOX-1861
> Project: PDFBox
> Issue Type: Bug
> Affects Versions: 2.0.0
> Environment: W7
> Reporter: Tilman Hausherr
> Priority: Minor
> Attachments: SetLineDashPattern.patch, asy-gouraud.pdf,
> asy-gouraud.pdf-1-good.png, asy-gouraud.pdf-1-trunk.png, tracemonkey.pdf,
> tracemonkey.pdf-2.png
>
>
> The line in the attached page should be dashed differently than it is in the
> rendering.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)