pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tilman Hausherr (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PDFBOX-4589) PDPageContent stream warns about overwriting in overwrite mode
Date Tue, 02 Jul 2019 06:53:00 GMT

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

Tilman Hausherr commented on PDFBOX-4589:
-----------------------------------------

Yeah… the warning should be moved to the short constructor. Which is a bit tricky because {{this()}}
must be the first statement.
{code:java}
public PDPageContentStream(PDDocument document, PDPage sourcePage) throws IOException
{
    this(document, sourcePage, AppendMode.OVERWRITE, true, false);
}{code}

> PDPageContent stream warns about overwriting in overwrite mode
> --------------------------------------------------------------
>
>                 Key: PDFBOX-4589
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4589
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 2.0.11, 2.0.16
>            Reporter: Jose Novacho
>            Priority: Trivial
>
> When updating page content stream the class PDContentStream warns about overwriting the
content. Even thought the PDContentStream is explicitly set to overwrite mode.
> {{[o.a.p.p.PDPageContentStream] - You are overwriting an existing content, you should
use the append mode}}
> This creates slight confusion when looking into logs.
>  
> The problematic code is in constructor of org/apache/pdfbox/pdmodel/PDPageContentStream.java
>  
> There should be additional check before logging the warning.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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


Mime
View raw message