You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Michael Klink (Jira)" <ji...@apache.org> on 2021/07/09 09:15:00 UTC

[jira] [Comment Edited] (PDFBOX-5236) PDPageContentStream.setLineWidth(float) not allowed in text block

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

Michael Klink edited comment on PDFBOX-5236 at 7/9/21, 9:14 AM:
----------------------------------------------------------------

Indeed, and that's not the only incorrectly rejected instruction.

According to ISO 32000-2:2020, _Figure 9 — Graphics objects_ does allow _General graphics state_ operators in text objects. And not only *w* is in this category, *w, J, j, M, d, ri, i, gs, q, Q* are.

Yes, in the 2020 update of ISO 32000-2 *q* and *Q* have become general graphics state operators, too. This might break some code.


was (Author: mkl):
Indeed, and that's not the only incorrectly rejected instruction.

According to ISO 32000-2:2020, *Figure 9 — Graphics objects* does allow *General graphics state* operators in text objects. And not only **w** is in this category, **w, J, j, M, d, ri, i, gs, q, Q** are.

Yes, in the 2020 update of ISO 32000-2 **q** and **Q** have become general graphics state operators, too. This might break some code.

> PDPageContentStream.setLineWidth(float) not allowed in text block
> -----------------------------------------------------------------
>
>                 Key: PDFBOX-5236
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5236
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 2.0.24
>            Reporter: Todd VanderWoude
>            Assignee: Andreas Lehmkühler
>            Priority: Major
>             Fix For: 2.0.25, 3.0.0 PDFBox
>
>
> PDPageContentStream.setLineWidth(float) incorrectly throws an exception that setLineWidth is not allowed within a text block.  setLineWidth uses PDF operator "w", which according to the PDF specification, it is allowed and is used to set the stroke line width for text outlines when using either STROKE or FILL_STROKE rendering modes.  This is shown on page 392 of the specification at [https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdf_reference_archive/pdf_reference_1-7.pdf] in Example 5.4.
>  



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

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