[
https://issues.apache.org/jira/browse/PDFBOX-5280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Christian Appl updated PDFBOX-5280:
-----------------------------------
Description:
**This patch is a byproduct of my other contributions. I wanted to simplify the
creation of new PDF via PDFBox and I like method chaining.
This is not a major contribution whatsoever and does not really add new
functionality.
But instead of letting this rot in a shelf or some local mirror, I could just
suggest it here.
It allows chaining the different methods of PDPageContentStreams /
PDAbstractContentStreams.
*Without method chaining:*
!image-2021-09-15-13-53-20-550.png!
*With method chaining:*
!image-2021-09-15-13-54-13-203.png!
If this patch is not beneficial or uninteresting simply close this issue.
*Be aware though:*
This is based on bold typecasts. If you wanted to include this, this is
something I could possibly fix:
!image-2021-09-15-14-01-54-602.png!
*Also be aware:*
This is a quick and dirty solution and does not include other stream types,
that may extend PDAbstractContentStream.
If you were interested - please tell me so I can check that and clean it up.
*This is not fit for direct inclusion and would require some cleanup first!*
was:
**This patch is a byproduct of my other contributions. I wanted to simplify the
creation of new PDF via PDFBox and I like method chaining.
This is not a major contribution whatsoever and does not really add new
functionality.
But instead of letting this rot in a shelf or some local mirror, I could just
suggest it here.
It allows chaining the different methods of PDPageContentStreams /
PDAbstractContentStreams.
*Without method chaining:*
!image-2021-09-15-13-53-20-550.png!
*With method chaining:*
!image-2021-09-15-13-54-13-203.png!
If this patch is not beneficial or uninteresting simply close this issue.
*Be aware though:*
This is based on bold typecasts. If you wanted to include this, this is
something I could possibly fix:
!image-2021-09-15-14-01-54-602.png!
> Suggestion: Add method chaining for PDPageContentStream
> -------------------------------------------------------
>
> Key: PDFBOX-5280
> URL: https://issues.apache.org/jira/browse/PDFBOX-5280
> Project: PDFBox
> Issue Type: Improvement
> Components: Writing
> Affects Versions: 3.0.0 PDFBox
> Reporter: Christian Appl
> Priority: Minor
> Attachments: Method_chaining_for_PDPageContentStream.patch,
> image-2021-09-15-13-53-20-550.png, image-2021-09-15-13-54-13-203.png,
> image-2021-09-15-14-01-54-602.png
>
>
> **This patch is a byproduct of my other contributions. I wanted to simplify
> the creation of new PDF via PDFBox and I like method chaining.
> This is not a major contribution whatsoever and does not really add new
> functionality.
> But instead of letting this rot in a shelf or some local mirror, I could
> just suggest it here.
> It allows chaining the different methods of PDPageContentStreams /
> PDAbstractContentStreams.
> *Without method chaining:*
> !image-2021-09-15-13-53-20-550.png!
> *With method chaining:*
> !image-2021-09-15-13-54-13-203.png!
> If this patch is not beneficial or uninteresting simply close this issue.
> *Be aware though:*
> This is based on bold typecasts. If you wanted to include this, this is
> something I could possibly fix:
> !image-2021-09-15-14-01-54-602.png!
> *Also be aware:*
> This is a quick and dirty solution and does not include other stream types,
> that may extend PDAbstractContentStream.
> If you were interested - please tell me so I can check that and clean it up.
> *This is not fit for direct inclusion and would require some cleanup first!*
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]