[
https://issues.apache.org/jira/browse/PDFBOX-3353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15295517#comment-15295517
]
Maruan Sahyoun commented on PDFBOX-3353:
----------------------------------------
{quote}
PDSquareAnnotationTest.java tests itself, i.e. it tests a file that is already
there, not a file where the appearance stream is missing
{quote}
I'll simplify the test and add a test case with an empty annotation. The 'self
test' is there to ensure that the content is the same as the one Adobe creates
for an appearance with the same settings.
{quote}
something must be done about that double content stream code, that would be the
"shared implementation" you mention
{quote}
I'd propose to create {{PDAbstractContentStream}} in {{o.a.p.contentstream}} -
WDYT? I don't know how good our test coverage is to not break
{{PDPageContentStream}} though - thoughts?
{quote}
appearance handlers should have some common code in the base class.
generateNormalAppearance has only 3 lines that are specific for this
annotation, all the rest could be common
{quote}
I'll review and change that.
{quote}
why is the PDAppearanceContentStream separated from the PDDocument, i.e. not
using any scratch file settings from it? Could this become a problem or is this
not relevant?
{quote}
I considered it to be beneficial to have that self contained and dependent on
the annotation alone without a need for {{PDDocument}} and {{PDPage}} as in
{{PDPageContentStream}}. IMHO as the stream is typically small the memory
consumption even with more annotations shouldn't be an issue. If hat comes up
we can add scratch file usage later.
{quote}
why is that formatDecimal important?
{quote}
well I've kept it from {{PDPageContentStream}} and it's used for formatting the
output of floats and ints.
> Create appearance streams for annotations
> -----------------------------------------
>
> Key: PDFBOX-3353
> URL: https://issues.apache.org/jira/browse/PDFBOX-3353
> Project: PDFBox
> Issue Type: Task
> Components: PDModel, Rendering
> Affects Versions: 1.8.12, 2.0.0, 2.0.1, 2.0.2, 2.1.0
> Reporter: Tilman Hausherr
> Labels: Annotations
> Attachments: showAnnotation.java
>
>
> Create appearance streams for annotations when missing.
> I'll start by replacing current code for Ink and Link annotations.
> Good example PDFs:
> http://www.pdfill.com/example/pdf_commenting_new.pdf
> https://github.com/mozilla/pdf.js/issues/6810
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]