You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Maruan Sahyoun (JIRA)" <ji...@apache.org> on 2018/01/16 21:31:00 UTC

[jira] [Commented] (PDFBOX-4068) Create ContentStream for XObject forms

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

Maruan Sahyoun commented on PDFBOX-4068:
----------------------------------------

I think for 2.0 using PDPageContentStream and adding a parameter should be fine.

For 3.0 why not have a basic writer which writes to an {{OutputStream}} abstracting most of the raw commands and decorate that in PDPageContentStream, PDAppearanceContentStream and others to add state management (i.e. which color has been set ... to avoid duplicate calls).

I'd rather use specific implementations as to be able to replicate the result of Adobe tools more easily. E.g. for ApperanceStreams the short version of color setting is used instead of setting the color space.

> Create ContentStream for XObject forms
> --------------------------------------
>
>                 Key: PDFBOX-4068
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4068
>             Project: PDFBox
>          Issue Type: Task
>          Components: PDModel
>            Reporter: Tilman Hausherr
>            Priority: Major
>
> We have a {{PDAppearanceContentStream}} for appearances but nothing for XObject forms.
> What we need should extend {{PDAbstractContentStream}} and should have a constructor like
> {code:java}
> public PDFormContentStream(PDFormXObject form) throws IOException
> {code}
> Alternatively, why not replace {{PDAppearanceContentStream}} ? Its parameter {{PDAppearanceStream}} is extended from {{PDFormXObject}} so we could just use the base class.
> We need this both for 2.0 and 3.* - we have users who have a really hard time fiddling with low level operators instead of using the methods.
> In 2.0 we could replace the parameter of {{PDPageContentStream}} that is currently {{PDAppearanceStream}}. This would be a non breaking change.



--
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