[jira] [Updated] (PDFBOX-4106) Vertical text creation

2018-02-14 Thread Aaron Madlon-Kay (JIRA)

 [ 
https://issues.apache.org/jira/browse/PDFBOX-4106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aaron Madlon-Kay updated PDFBOX-4106:
-
Attachment: (was: 0002-Abstract-cmap-lookup-into-an-interface.patch)

> Vertical text creation
> --
>
> Key: PDFBOX-4106
> URL: https://issues.apache.org/jira/browse/PDFBOX-4106
> Project: PDFBox
>  Issue Type: New Feature
>  Components: FontBox, Parsing, Writing
>Reporter: Aaron Madlon-Kay
>Priority: Major
>  Labels: embed, gsub, parsing, vertical
> Attachments: 0003-Implement-GSUB-substitution-on-TrueTypeFont.patch, 
> 0004-Use-vhea-vmtx-to-fix-vertical-displacements-in-PCIDF.patch, 
> 0005-Add-factory-methods-for-loading-TTF-as-vertical-font.patch, 
> 0006-Implement-vertical-metrics-support-when-embedding-su.patch, 
> sample_code.txt, vertical.pdf
>
>
> I needed to output vertical Japanese text, but was stymied by several 
> limitations:
> * No API to load a TTF as Identity-V encoding
> * No support for 'vert' glyph substitution
> * No support for vertical metrics ('vhea' and 'vmtx' tables are parsed but 
> not used at all)
> I have attached a series of patches that implement the above features. 
> Highlights:
> * The GSUB glyph substitution table is parsed (limitation: type 1 lookups 
> only; this is sufficient for many features including 'vert'/'vrt2' vertical 
> glyph substitution)
> * Cmap lookup makes use of GSUB when features are enabled on a TTF
> * 'vhea' and 'vmtx' metrics are applied to PDCIDFont when appropriate, and 
> are embedded/subsetted correctly through the DW2/W2 CIDFont dictionary
> * An API has been added for loading a TTF as a vertical font, setting 
> Identity-V encoding and enabling 'vert'/'vrt2' substitution
> Each patch could approximately be split out into a separate ticket, if 
> desired.
> Also attached is some sample code that exercises these patches and 
> illustrates the effect of vertical glyph positioning. The sample output PDF 
> is also attached.



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

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



[jira] [Updated] (PDFBOX-4106) Vertical text creation

2018-02-14 Thread Aaron Madlon-Kay (JIRA)

 [ 
https://issues.apache.org/jira/browse/PDFBOX-4106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aaron Madlon-Kay updated PDFBOX-4106:
-
Attachment: (was: 0001-Parse-GSUB-table.patch)

> Vertical text creation
> --
>
> Key: PDFBOX-4106
> URL: https://issues.apache.org/jira/browse/PDFBOX-4106
> Project: PDFBox
>  Issue Type: New Feature
>  Components: FontBox, Parsing, Writing
>Reporter: Aaron Madlon-Kay
>Priority: Major
>  Labels: embed, gsub, parsing, vertical
> Attachments: 0003-Implement-GSUB-substitution-on-TrueTypeFont.patch, 
> 0004-Use-vhea-vmtx-to-fix-vertical-displacements-in-PCIDF.patch, 
> 0005-Add-factory-methods-for-loading-TTF-as-vertical-font.patch, 
> 0006-Implement-vertical-metrics-support-when-embedding-su.patch, 
> sample_code.txt, vertical.pdf
>
>
> I needed to output vertical Japanese text, but was stymied by several 
> limitations:
> * No API to load a TTF as Identity-V encoding
> * No support for 'vert' glyph substitution
> * No support for vertical metrics ('vhea' and 'vmtx' tables are parsed but 
> not used at all)
> I have attached a series of patches that implement the above features. 
> Highlights:
> * The GSUB glyph substitution table is parsed (limitation: type 1 lookups 
> only; this is sufficient for many features including 'vert'/'vrt2' vertical 
> glyph substitution)
> * Cmap lookup makes use of GSUB when features are enabled on a TTF
> * 'vhea' and 'vmtx' metrics are applied to PDCIDFont when appropriate, and 
> are embedded/subsetted correctly through the DW2/W2 CIDFont dictionary
> * An API has been added for loading a TTF as a vertical font, setting 
> Identity-V encoding and enabling 'vert'/'vrt2' substitution
> Each patch could approximately be split out into a separate ticket, if 
> desired.
> Also attached is some sample code that exercises these patches and 
> illustrates the effect of vertical glyph positioning. The sample output PDF 
> is also attached.



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

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



[jira] [Updated] (PDFBOX-4106) Vertical text creation

2018-02-14 Thread Aaron Madlon-Kay (JIRA)

 [ 
https://issues.apache.org/jira/browse/PDFBOX-4106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aaron Madlon-Kay updated PDFBOX-4106:
-
Attachment: (was: 
0005-Add-factory-methods-for-loading-TTF-as-vertical-font.patch)

> Vertical text creation
> --
>
> Key: PDFBOX-4106
> URL: https://issues.apache.org/jira/browse/PDFBOX-4106
> Project: PDFBox
>  Issue Type: New Feature
>  Components: FontBox, Parsing, Writing
>Reporter: Aaron Madlon-Kay
>Priority: Major
>  Labels: embed, gsub, parsing, vertical
> Attachments: sample_code.txt, vertical.pdf
>
>
> I needed to output vertical Japanese text, but was stymied by several 
> limitations:
> * No API to load a TTF as Identity-V encoding
> * No support for 'vert' glyph substitution
> * No support for vertical metrics ('vhea' and 'vmtx' tables are parsed but 
> not used at all)
> I have attached a series of patches that implement the above features. 
> Highlights:
> * The GSUB glyph substitution table is parsed (limitation: type 1 lookups 
> only; this is sufficient for many features including 'vert'/'vrt2' vertical 
> glyph substitution)
> * Cmap lookup makes use of GSUB when features are enabled on a TTF
> * 'vhea' and 'vmtx' metrics are applied to PDCIDFont when appropriate, and 
> are embedded/subsetted correctly through the DW2/W2 CIDFont dictionary
> * An API has been added for loading a TTF as a vertical font, setting 
> Identity-V encoding and enabling 'vert'/'vrt2' substitution
> Each patch could approximately be split out into a separate ticket, if 
> desired.
> Also attached is some sample code that exercises these patches and 
> illustrates the effect of vertical glyph positioning. The sample output PDF 
> is also attached.



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

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



[jira] [Updated] (PDFBOX-4106) Vertical text creation

2018-02-14 Thread Aaron Madlon-Kay (JIRA)

 [ 
https://issues.apache.org/jira/browse/PDFBOX-4106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aaron Madlon-Kay updated PDFBOX-4106:
-
Attachment: (was: 
0004-Use-vhea-vmtx-to-fix-vertical-displacements-in-PCIDF.patch)

> Vertical text creation
> --
>
> Key: PDFBOX-4106
> URL: https://issues.apache.org/jira/browse/PDFBOX-4106
> Project: PDFBox
>  Issue Type: New Feature
>  Components: FontBox, Parsing, Writing
>Reporter: Aaron Madlon-Kay
>Priority: Major
>  Labels: embed, gsub, parsing, vertical
> Attachments: sample_code.txt, vertical.pdf
>
>
> I needed to output vertical Japanese text, but was stymied by several 
> limitations:
> * No API to load a TTF as Identity-V encoding
> * No support for 'vert' glyph substitution
> * No support for vertical metrics ('vhea' and 'vmtx' tables are parsed but 
> not used at all)
> I have attached a series of patches that implement the above features. 
> Highlights:
> * The GSUB glyph substitution table is parsed (limitation: type 1 lookups 
> only; this is sufficient for many features including 'vert'/'vrt2' vertical 
> glyph substitution)
> * Cmap lookup makes use of GSUB when features are enabled on a TTF
> * 'vhea' and 'vmtx' metrics are applied to PDCIDFont when appropriate, and 
> are embedded/subsetted correctly through the DW2/W2 CIDFont dictionary
> * An API has been added for loading a TTF as a vertical font, setting 
> Identity-V encoding and enabling 'vert'/'vrt2' substitution
> Each patch could approximately be split out into a separate ticket, if 
> desired.
> Also attached is some sample code that exercises these patches and 
> illustrates the effect of vertical glyph positioning. The sample output PDF 
> is also attached.



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

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



[jira] [Updated] (PDFBOX-4106) Vertical text creation

2018-02-14 Thread Aaron Madlon-Kay (JIRA)

 [ 
https://issues.apache.org/jira/browse/PDFBOX-4106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aaron Madlon-Kay updated PDFBOX-4106:
-
Attachment: (was: 
0006-Implement-vertical-metrics-support-when-embedding-su.patch)

> Vertical text creation
> --
>
> Key: PDFBOX-4106
> URL: https://issues.apache.org/jira/browse/PDFBOX-4106
> Project: PDFBox
>  Issue Type: New Feature
>  Components: FontBox, Parsing, Writing
>Reporter: Aaron Madlon-Kay
>Priority: Major
>  Labels: embed, gsub, parsing, vertical
> Attachments: sample_code.txt, vertical.pdf
>
>
> I needed to output vertical Japanese text, but was stymied by several 
> limitations:
> * No API to load a TTF as Identity-V encoding
> * No support for 'vert' glyph substitution
> * No support for vertical metrics ('vhea' and 'vmtx' tables are parsed but 
> not used at all)
> I have attached a series of patches that implement the above features. 
> Highlights:
> * The GSUB glyph substitution table is parsed (limitation: type 1 lookups 
> only; this is sufficient for many features including 'vert'/'vrt2' vertical 
> glyph substitution)
> * Cmap lookup makes use of GSUB when features are enabled on a TTF
> * 'vhea' and 'vmtx' metrics are applied to PDCIDFont when appropriate, and 
> are embedded/subsetted correctly through the DW2/W2 CIDFont dictionary
> * An API has been added for loading a TTF as a vertical font, setting 
> Identity-V encoding and enabling 'vert'/'vrt2' substitution
> Each patch could approximately be split out into a separate ticket, if 
> desired.
> Also attached is some sample code that exercises these patches and 
> illustrates the effect of vertical glyph positioning. The sample output PDF 
> is also attached.



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

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



[jira] [Updated] (PDFBOX-4106) Vertical text creation

2018-02-14 Thread Aaron Madlon-Kay (JIRA)

 [ 
https://issues.apache.org/jira/browse/PDFBOX-4106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aaron Madlon-Kay updated PDFBOX-4106:
-
Attachment: (was: 
0003-Implement-GSUB-substitution-on-TrueTypeFont.patch)

> Vertical text creation
> --
>
> Key: PDFBOX-4106
> URL: https://issues.apache.org/jira/browse/PDFBOX-4106
> Project: PDFBox
>  Issue Type: New Feature
>  Components: FontBox, Parsing, Writing
>Reporter: Aaron Madlon-Kay
>Priority: Major
>  Labels: embed, gsub, parsing, vertical
> Attachments: sample_code.txt, vertical.pdf
>
>
> I needed to output vertical Japanese text, but was stymied by several 
> limitations:
> * No API to load a TTF as Identity-V encoding
> * No support for 'vert' glyph substitution
> * No support for vertical metrics ('vhea' and 'vmtx' tables are parsed but 
> not used at all)
> I have attached a series of patches that implement the above features. 
> Highlights:
> * The GSUB glyph substitution table is parsed (limitation: type 1 lookups 
> only; this is sufficient for many features including 'vert'/'vrt2' vertical 
> glyph substitution)
> * Cmap lookup makes use of GSUB when features are enabled on a TTF
> * 'vhea' and 'vmtx' metrics are applied to PDCIDFont when appropriate, and 
> are embedded/subsetted correctly through the DW2/W2 CIDFont dictionary
> * An API has been added for loading a TTF as a vertical font, setting 
> Identity-V encoding and enabling 'vert'/'vrt2' substitution
> Each patch could approximately be split out into a separate ticket, if 
> desired.
> Also attached is some sample code that exercises these patches and 
> illustrates the effect of vertical glyph positioning. The sample output PDF 
> is also attached.



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

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



[jira] [Updated] (PDFBOX-4106) Vertical text creation

2018-02-14 Thread Aaron Madlon-Kay (JIRA)

 [ 
https://issues.apache.org/jira/browse/PDFBOX-4106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aaron Madlon-Kay updated PDFBOX-4106:
-
Attachment: 0001-Add-OpenTypeScript-class-to-get-OT-script-tags-for-c.patch
0002-Optimize-Unicode-script-storage-and-lookup.patch
0003-Parse-GSUB-table.patch
0004-Abstract-cmap-lookup-into-an-interface.patch
0005-Implement-GSUB-substitution-on-TrueTypeFont.patch
0006-Use-vhea-vmtx-to-fix-vertical-displacements-in-PCIDF.patch
0007-Add-factory-methods-for-loading-TTF-as-vertical-font.patch

> Vertical text creation
> --
>
> Key: PDFBOX-4106
> URL: https://issues.apache.org/jira/browse/PDFBOX-4106
> Project: PDFBox
>  Issue Type: New Feature
>  Components: FontBox, Parsing, Writing
>Reporter: Aaron Madlon-Kay
>Priority: Major
>  Labels: embed, gsub, parsing, vertical
> Attachments: 
> 0001-Add-OpenTypeScript-class-to-get-OT-script-tags-for-c.patch, 
> 0002-Optimize-Unicode-script-storage-and-lookup.patch, 
> 0003-Parse-GSUB-table.patch, 
> 0004-Abstract-cmap-lookup-into-an-interface.patch, 
> 0005-Implement-GSUB-substitution-on-TrueTypeFont.patch, 
> 0006-Use-vhea-vmtx-to-fix-vertical-displacements-in-PCIDF.patch, 
> 0007-Add-factory-methods-for-loading-TTF-as-vertical-font.patch, 
> sample_code.txt, vertical.pdf
>
>
> I needed to output vertical Japanese text, but was stymied by several 
> limitations:
> * No API to load a TTF as Identity-V encoding
> * No support for 'vert' glyph substitution
> * No support for vertical metrics ('vhea' and 'vmtx' tables are parsed but 
> not used at all)
> I have attached a series of patches that implement the above features. 
> Highlights:
> * The GSUB glyph substitution table is parsed (limitation: type 1 lookups 
> only; this is sufficient for many features including 'vert'/'vrt2' vertical 
> glyph substitution)
> * Cmap lookup makes use of GSUB when features are enabled on a TTF
> * 'vhea' and 'vmtx' metrics are applied to PDCIDFont when appropriate, and 
> are embedded/subsetted correctly through the DW2/W2 CIDFont dictionary
> * An API has been added for loading a TTF as a vertical font, setting 
> Identity-V encoding and enabling 'vert'/'vrt2' substitution
> Each patch could approximately be split out into a separate ticket, if 
> desired.
> Also attached is some sample code that exercises these patches and 
> illustrates the effect of vertical glyph positioning. The sample output PDF 
> is also attached.



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

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



[jira] [Commented] (PDFBOX-4106) Vertical text creation

2018-02-14 Thread Aaron Madlon-Kay (JIRA)

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

Aaron Madlon-Kay commented on PDFBOX-4106:
--

Actually when removing the {{UnicodeScript}} stuff I found that a full 
reimplementation based the actual Unicode 10 Script.txt provides significantly 
better coverage than JDK7's, which I guess is based on Unicode 6. So I think 
the JDK7 implementation can be thrown out, but I do have it in git if you 
really want it.

I have deleted my previous patches and uploaded a new set with the changes 
discussed earlier. However I am getting an internal error when I try to upload 
patch 8; here is a link to it on GitHub:
https://github.com/amake/pdfbox/commit/bf799ddf73db4f23cede0d8564221e1caa388223.patch

> Vertical text creation
> --
>
> Key: PDFBOX-4106
> URL: https://issues.apache.org/jira/browse/PDFBOX-4106
> Project: PDFBox
>  Issue Type: New Feature
>  Components: FontBox, Parsing, Writing
>Reporter: Aaron Madlon-Kay
>Priority: Major
>  Labels: embed, gsub, parsing, vertical
> Attachments: 
> 0001-Add-OpenTypeScript-class-to-get-OT-script-tags-for-c.patch, 
> 0002-Optimize-Unicode-script-storage-and-lookup.patch, 
> 0003-Parse-GSUB-table.patch, 
> 0004-Abstract-cmap-lookup-into-an-interface.patch, 
> 0005-Implement-GSUB-substitution-on-TrueTypeFont.patch, 
> 0006-Use-vhea-vmtx-to-fix-vertical-displacements-in-PCIDF.patch, 
> 0007-Add-factory-methods-for-loading-TTF-as-vertical-font.patch, 
> sample_code.txt, vertical.pdf
>
>
> I needed to output vertical Japanese text, but was stymied by several 
> limitations:
> * No API to load a TTF as Identity-V encoding
> * No support for 'vert' glyph substitution
> * No support for vertical metrics ('vhea' and 'vmtx' tables are parsed but 
> not used at all)
> I have attached a series of patches that implement the above features. 
> Highlights:
> * The GSUB glyph substitution table is parsed (limitation: type 1 lookups 
> only; this is sufficient for many features including 'vert'/'vrt2' vertical 
> glyph substitution)
> * Cmap lookup makes use of GSUB when features are enabled on a TTF
> * 'vhea' and 'vmtx' metrics are applied to PDCIDFont when appropriate, and 
> are embedded/subsetted correctly through the DW2/W2 CIDFont dictionary
> * An API has been added for loading a TTF as a vertical font, setting 
> Identity-V encoding and enabling 'vert'/'vrt2' substitution
> Each patch could approximately be split out into a separate ticket, if 
> desired.
> Also attached is some sample code that exercises these patches and 
> illustrates the effect of vertical glyph positioning. The sample output PDF 
> is also attached.



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

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



[jira] [Commented] (PDFBOX-4106) Vertical text creation

2018-02-14 Thread Maruan Sahyoun (JIRA)

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

Maruan Sahyoun commented on PDFBOX-4106:


I've added the patch [~amake] linked to to that ticket.

> Vertical text creation
> --
>
> Key: PDFBOX-4106
> URL: https://issues.apache.org/jira/browse/PDFBOX-4106
> Project: PDFBox
>  Issue Type: New Feature
>  Components: FontBox, Parsing, Writing
>Reporter: Aaron Madlon-Kay
>Priority: Major
>  Labels: embed, gsub, parsing, vertical
> Attachments: 
> 0001-Add-OpenTypeScript-class-to-get-OT-script-tags-for-c.patch, 
> 0002-Optimize-Unicode-script-storage-and-lookup.patch, 
> 0003-Parse-GSUB-table.patch, 
> 0004-Abstract-cmap-lookup-into-an-interface.patch, 
> 0005-Implement-GSUB-substitution-on-TrueTypeFont.patch, 
> 0006-Use-vhea-vmtx-to-fix-vertical-displacements-in-PCIDF.patch, 
> 0007-Add-factory-methods-for-loading-TTF-as-vertical-font.patch, 
> 0008-Implement-vertical-metrics-support-when-embedding-subsetting.patch, 
> sample_code.txt, vertical.pdf
>
>
> I needed to output vertical Japanese text, but was stymied by several 
> limitations:
> * No API to load a TTF as Identity-V encoding
> * No support for 'vert' glyph substitution
> * No support for vertical metrics ('vhea' and 'vmtx' tables are parsed but 
> not used at all)
> I have attached a series of patches that implement the above features. 
> Highlights:
> * The GSUB glyph substitution table is parsed (limitation: type 1 lookups 
> only; this is sufficient for many features including 'vert'/'vrt2' vertical 
> glyph substitution)
> * Cmap lookup makes use of GSUB when features are enabled on a TTF
> * 'vhea' and 'vmtx' metrics are applied to PDCIDFont when appropriate, and 
> are embedded/subsetted correctly through the DW2/W2 CIDFont dictionary
> * An API has been added for loading a TTF as a vertical font, setting 
> Identity-V encoding and enabling 'vert'/'vrt2' substitution
> Each patch could approximately be split out into a separate ticket, if 
> desired.
> Also attached is some sample code that exercises these patches and 
> illustrates the effect of vertical glyph positioning. The sample output PDF 
> is also attached.



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

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



[jira] [Updated] (PDFBOX-4106) Vertical text creation

2018-02-14 Thread Maruan Sahyoun (JIRA)

 [ 
https://issues.apache.org/jira/browse/PDFBOX-4106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maruan Sahyoun updated PDFBOX-4106:
---
Attachment: 
0008-Implement-vertical-metrics-support-when-embedding-subsetting.patch

> Vertical text creation
> --
>
> Key: PDFBOX-4106
> URL: https://issues.apache.org/jira/browse/PDFBOX-4106
> Project: PDFBox
>  Issue Type: New Feature
>  Components: FontBox, Parsing, Writing
>Reporter: Aaron Madlon-Kay
>Priority: Major
>  Labels: embed, gsub, parsing, vertical
> Attachments: 
> 0001-Add-OpenTypeScript-class-to-get-OT-script-tags-for-c.patch, 
> 0002-Optimize-Unicode-script-storage-and-lookup.patch, 
> 0003-Parse-GSUB-table.patch, 
> 0004-Abstract-cmap-lookup-into-an-interface.patch, 
> 0005-Implement-GSUB-substitution-on-TrueTypeFont.patch, 
> 0006-Use-vhea-vmtx-to-fix-vertical-displacements-in-PCIDF.patch, 
> 0007-Add-factory-methods-for-loading-TTF-as-vertical-font.patch, 
> 0008-Implement-vertical-metrics-support-when-embedding-subsetting.patch, 
> sample_code.txt, vertical.pdf
>
>
> I needed to output vertical Japanese text, but was stymied by several 
> limitations:
> * No API to load a TTF as Identity-V encoding
> * No support for 'vert' glyph substitution
> * No support for vertical metrics ('vhea' and 'vmtx' tables are parsed but 
> not used at all)
> I have attached a series of patches that implement the above features. 
> Highlights:
> * The GSUB glyph substitution table is parsed (limitation: type 1 lookups 
> only; this is sufficient for many features including 'vert'/'vrt2' vertical 
> glyph substitution)
> * Cmap lookup makes use of GSUB when features are enabled on a TTF
> * 'vhea' and 'vmtx' metrics are applied to PDCIDFont when appropriate, and 
> are embedded/subsetted correctly through the DW2/W2 CIDFont dictionary
> * An API has been added for loading a TTF as a vertical font, setting 
> Identity-V encoding and enabling 'vert'/'vrt2' substitution
> Each patch could approximately be split out into a separate ticket, if 
> desired.
> Also attached is some sample code that exercises these patches and 
> illustrates the effect of vertical glyph positioning. The sample output PDF 
> is also attached.



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

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



[jira] [Updated] (PDFBOX-4094) Add support for a flag disabling the rendering of PDF annotations in PDFRenderer

2018-02-14 Thread Maxime Veron (JIRA)

 [ 
https://issues.apache.org/jira/browse/PDFBOX-4094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maxime Veron updated PDFBOX-4094:
-
Attachment: 0001-PDFBOX-4094-comment-Modify-PDFRenderer-in-order-to-a.patch

> Add support for a flag disabling the rendering of PDF annotations in 
> PDFRenderer
> 
>
> Key: PDFBOX-4094
> URL: https://issues.apache.org/jira/browse/PDFBOX-4094
> Project: PDFBox
>  Issue Type: Wish
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Maxime Veron
>Priority: Minor
> Attachments: 
> 0001-PDFBOX-4094-comment-Modify-PDFRenderer-in-order-to-a.patch
>
>
> Regardless if annotations are supposed to be printed or not on the PDF, would 
> it not be interesting to possess a flag allowing to choose if annotations 
> should be printed on top of the document pages?
>  
> Here is a diff of a very rough implementation of it : 
>  
> {code:java}
> diff --git 
> a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java 
> b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java
> --- a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java
> +++ b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java
> @@ -35,6 +35,9 @@ public class PDFRenderer
>  protected final PDDocument document;
>  // TODO keep rendering state such as caches here
>  
> +// parameter used to know if the rendering should include annotations 
> +private boolean renderAnnotations = true;
> +
>  /**
>   * Creates a new PDFRenderer.
>   * @param document the document to render
> @@ -224,4 +227,14 @@ public class PDFRenderer
>  {
>  return new PageDrawer(parameters);
>  }
> +
> +public void setRenderAnnotations(boolean render) 
> +{
> +this.renderAnnotations = render;
> +}
> +
> +public boolean renderAnnotations() 
> +{
> +return renderAnnotations;
> +}
>  }
> diff --git a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java 
> b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
> --- a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
> +++ b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
> @@ -195,11 +195,13 @@ public class PageDrawer extends PDFGraphicsStreamEngine
>  
>  processPage(getPage());
>  
> -for (PDAnnotation annotation : getPage().getAnnotations())
> -{
> -showAnnotation(annotation);
> +if (getRenderer().renderAnnotations()) 
> +{ 
> +for (PDAnnotation annotation : getPage().getAnnotations())
> +{
> +showAnnotation(annotation);
> +}
>  }
> -
>  graphics = null;
>  }
>  
> {code}
> And an exemple of a use case: 
> {code:java}
> PDDocument doc = getPDDocument(); 
> PDFRenderer pdfRenderer = new PDFRenderer(doc);
> pdfRenderer.setRenderAnnotations(false);
> pdfRenderer.renderImage(page);
>  
> {code}
> By default, this would be keeping the same behavior as it used to (aka : 
> print the annotations) but possess an opt-out feature.
>  
> Best regards,
> M.Veron



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

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



[jira] [Commented] (PDFBOX-4094) Add support for a flag disabling the rendering of PDF annotations in PDFRenderer

2018-02-14 Thread Maxime Veron (JIRA)

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

Maxime Veron commented on PDFBOX-4094:
--

Back again. Got some issues on the diff-ing of the code, was worse in a patch 
format (my own formatting differs a bit from PDFBox formatting), here is the 
end result: 

 

[^0001-PDFBOX-4094-comment-Modify-PDFRenderer-in-order-to-a.patch]

 

^Please note it is not an actual patch but a git diff.^ 

 

^Would this code logic suit this wish request?^

^Best regards,^

^M.Veron^

> Add support for a flag disabling the rendering of PDF annotations in 
> PDFRenderer
> 
>
> Key: PDFBOX-4094
> URL: https://issues.apache.org/jira/browse/PDFBOX-4094
> Project: PDFBox
>  Issue Type: Wish
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Maxime Veron
>Priority: Minor
> Attachments: 
> 0001-PDFBOX-4094-comment-Modify-PDFRenderer-in-order-to-a.patch
>
>
> Regardless if annotations are supposed to be printed or not on the PDF, would 
> it not be interesting to possess a flag allowing to choose if annotations 
> should be printed on top of the document pages?
>  
> Here is a diff of a very rough implementation of it : 
>  
> {code:java}
> diff --git 
> a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java 
> b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java
> --- a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java
> +++ b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java
> @@ -35,6 +35,9 @@ public class PDFRenderer
>  protected final PDDocument document;
>  // TODO keep rendering state such as caches here
>  
> +// parameter used to know if the rendering should include annotations 
> +private boolean renderAnnotations = true;
> +
>  /**
>   * Creates a new PDFRenderer.
>   * @param document the document to render
> @@ -224,4 +227,14 @@ public class PDFRenderer
>  {
>  return new PageDrawer(parameters);
>  }
> +
> +public void setRenderAnnotations(boolean render) 
> +{
> +this.renderAnnotations = render;
> +}
> +
> +public boolean renderAnnotations() 
> +{
> +return renderAnnotations;
> +}
>  }
> diff --git a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java 
> b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
> --- a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
> +++ b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
> @@ -195,11 +195,13 @@ public class PageDrawer extends PDFGraphicsStreamEngine
>  
>  processPage(getPage());
>  
> -for (PDAnnotation annotation : getPage().getAnnotations())
> -{
> -showAnnotation(annotation);
> +if (getRenderer().renderAnnotations()) 
> +{ 
> +for (PDAnnotation annotation : getPage().getAnnotations())
> +{
> +showAnnotation(annotation);
> +}
>  }
> -
>  graphics = null;
>  }
>  
> {code}
> And an exemple of a use case: 
> {code:java}
> PDDocument doc = getPDDocument(); 
> PDFRenderer pdfRenderer = new PDFRenderer(doc);
> pdfRenderer.setRenderAnnotations(false);
> pdfRenderer.renderImage(page);
>  
> {code}
> By default, this would be keeping the same behavior as it used to (aka : 
> print the annotations) but possess an opt-out feature.
>  
> Best regards,
> M.Veron



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

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



Apache EU Roadshow CFP Closing Soon (23 February)

2018-02-14 Thread Sharan F

Hello Everyone

This is an initial reminder to let you all know that we are holding an 
Apache EU Roadshow co-located with FOSS Backstage in Berlin on 13^th and 
14^th June 2018. https://s.apache.org/tCHx


The Call for Proposals (CFP) for the Apache EU Roadshow is currently 
open and will close at the end of next week, so if you have been 
delaying making a submission because the closing date seemed a long way 
off, then it's time to start getting your proposals submitted.


So what are we looking for?
We will have 2 Apache Devrooms available during the 2 day Roadshow so 
are looking for projects including incubating ones, to submit 
presentations, panel discussions, BoFs, or workshop proposals. The main 
focus of the Roadshow will be IoT, Cloud, Httpd and Tomcat so if your 
project is involved in or around any of these technologies at Apache 
then we are very interested in hearing from you.


Community and collaboration is important at Apache so if your project is 
interested in organising a project sprint, meetup or hackathon during 
the Roadshow, then please submit it inthe CFP as we do have some space 
available to allocate for these.


If you are wanting to submit a talk on open source community related 
topics such as the Apache Way, governance or legal aspects then please 
submit these to the CFP for FOSS Backstage.


Tickets for the Apache EU Roadshow are included as part of the 
registration for FOSS Backstage, so to attend the Roadshow you will need 
to register for FOSS Backstage. Early Bird tickets are still available 
until the 21^st February 2018.


Please see below for important URLs to remember:

-  To submit a CFP for the Apache EU Roadshow 
:http://apachecon.com/euroadshow18/ 


-  To submit a CFP for FOSS Backstage : 
https://foss-backstage.de/call-papers


-  To register to attend the Apache EU Roadshow and/or FOSS Backstage : 
https://foss-backstage.de/tickets


For further updates and information about the Apache EU Roadshowplease 
check http://apachecon.com/euroadshow18/


Thanks
Sharan Foga, VP Apache Community Development


[jira] [Commented] (PDFBOX-3000) Transparency Group issues

2018-02-14 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on PDFBOX-3000:
-

Commit 1824259 from [~tilman] in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1824259 ]

PDFBOX-4095, PDFBOX-3000: to solve the problem that some blend modes don't work 
on the page background, render pages that have blending on a temporary 
transparent ARGB image and draw that one on the target image initialized with a 
white background, as suggested by Jani Pehkonen

> Transparency Group issues
> -
>
> Key: PDFBOX-3000
> URL: https://issues.apache.org/jira/browse/PDFBOX-3000
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.0
>Reporter: John Hewson
>Priority: Major
>  Labels: Transparency
> Fix For: 3.0.0 PDFBox
>
> Attachments: 007087-payment-due-p58_reduced2.pdf, BlendModes-rgb.pdf, 
> PDFBOX-1697-reduced-rotations.pdf, PDFBOX-2182_mod.pdf, PDFBOX-3400-RGB.pdf, 
> PDFBOX-3494_reduced.pdf, PDFBOX-3494_reduced_cropX.pdf, PDFBOX-3564-Mask.pdf, 
> PDFBox3359PanelTestEnhanced.java, PDFJS-2845-p1.pdf, 
> PDFJS-5526-p13_reduced1.pdf, PDFJS-5526-p13_reduced2.pdf, 
> PDFJS-5526-p13_reduced3-nogroup.pdf, PDFJS-5811-2-p3_reduced.pdf, 
> PDFJS-5811-2-p3_reduced4.pdf, PDFJS-5811-2-p4_reduced-rotations.pdf, 
> PDFJS-5811-2.pdf, PDFJS-5853_reduced.pdf, PDFJS-6967-p8.pdf, 
> PDFJS-6967_reduced_outside_softmask.pdf, PDFJS-8136-p1.pdf, 
> PDFJS-8136-p1_reduced.pdf, SoftMask-Clipped.pdf, SoftMask.pdf, 
> blendmodes.pdf, circle-simple.pdf, ds-firewall-enterprise-p1_reduced.pdf, 
> gs-bugzilla689309-reduced-bc0.pdf, gs-bugzilla689309-reduced-bc1.pdf, 
> gs-bugzilla689309-reduced.pdf, gs-bugzilla689931_reduced-Multiply.pdf, 
> gs-bugzilla689931_reduced-Screen.pdf, 
> gs-bugzilla689931_reduced-ScreenBlendPageBackground.pdf, 
> gs-bugzilla690022-reduced-rotations-cropbox.pdf, 
> gs-bugzilla690022-reduced-rotations.pdf, gs-bugzilla690022_reduced.pdf, 
> gs-bugzilla691157.pdf, gs-bugzilla691157_mod_unc.pdf, 
> gs-bugzilla691157_mod_unc.png, gs-bugzilla691348.pdf, 
> gs-bugzilla691650-2.pdf, gs-bugzilla692217_reduced.pdf, 
> gs-bugzilla693134-giant-pattern-reduced.pdf, gs-bugzilla693322_reduced.pdf, 
> gs-bugzilla694556-3.pdf, gs-bugzilla695354.pdf, 
> gs-bugzilla695582-transparency-fill-stroke.pdf, 
> gs-bugzilla695582-transparency-fill-stroke.pdf-1.png, pop-bugzilla40164.pdf, 
> samsung_galaxy_s_4_um-p1_reduced.pdf, snowman-nose-gradient-rgb.pdf, 
> snowman-nose-gradient-rgb_reduced-0.6-bad2.pdf, 
> snowman-nose-gradient-rgb_reduced-0.7-good2.pdf, 
> snowman-nose-gradient-screenshot-comparison-11.12.2016.jpg, 
> snowman-nose-gradient.pdf, snowmen-opacity-clipping-masks-2.0.3.png, 
> snowmen-opacity-clipping-masks-2.1-SNAPSHOT-10.12.2016.png, 
> snowmen-opacity-clipping-masks-2.1.0-SNAPSHOT-2016-12-07.png, 
> snowmen-opacity-clipping-masks-adobe-illustrator.png, 
> snowmen-opacity-clipping-masks.pdf, softmask-rewrite-alt1.patch, 
> softmask-rewrite.patch
>
>
> This is a follow-up issue for transparency group issues from PDFBOX-2423. 
> More details to come.



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

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



[jira] [Commented] (PDFBOX-3000) Transparency Group issues

2018-02-14 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on PDFBOX-3000:
-

Commit 1824258 from [~tilman] in branch 'pdfbox/branches/2.0'
[ https://svn.apache.org/r1824258 ]

PDFBOX-4095, PDFBOX-3000: to solve the problem that some blend modes don't work 
on the page background, render pages that have blending on a temporary 
transparent ARGB image and draw that one on the target image initialized with a 
white background, as suggested by Jani Pehkonen

> Transparency Group issues
> -
>
> Key: PDFBOX-3000
> URL: https://issues.apache.org/jira/browse/PDFBOX-3000
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.0
>Reporter: John Hewson
>Priority: Major
>  Labels: Transparency
> Fix For: 3.0.0 PDFBox
>
> Attachments: 007087-payment-due-p58_reduced2.pdf, BlendModes-rgb.pdf, 
> PDFBOX-1697-reduced-rotations.pdf, PDFBOX-2182_mod.pdf, PDFBOX-3400-RGB.pdf, 
> PDFBOX-3494_reduced.pdf, PDFBOX-3494_reduced_cropX.pdf, PDFBOX-3564-Mask.pdf, 
> PDFBox3359PanelTestEnhanced.java, PDFJS-2845-p1.pdf, 
> PDFJS-5526-p13_reduced1.pdf, PDFJS-5526-p13_reduced2.pdf, 
> PDFJS-5526-p13_reduced3-nogroup.pdf, PDFJS-5811-2-p3_reduced.pdf, 
> PDFJS-5811-2-p3_reduced4.pdf, PDFJS-5811-2-p4_reduced-rotations.pdf, 
> PDFJS-5811-2.pdf, PDFJS-5853_reduced.pdf, PDFJS-6967-p8.pdf, 
> PDFJS-6967_reduced_outside_softmask.pdf, PDFJS-8136-p1.pdf, 
> PDFJS-8136-p1_reduced.pdf, SoftMask-Clipped.pdf, SoftMask.pdf, 
> blendmodes.pdf, circle-simple.pdf, ds-firewall-enterprise-p1_reduced.pdf, 
> gs-bugzilla689309-reduced-bc0.pdf, gs-bugzilla689309-reduced-bc1.pdf, 
> gs-bugzilla689309-reduced.pdf, gs-bugzilla689931_reduced-Multiply.pdf, 
> gs-bugzilla689931_reduced-Screen.pdf, 
> gs-bugzilla689931_reduced-ScreenBlendPageBackground.pdf, 
> gs-bugzilla690022-reduced-rotations-cropbox.pdf, 
> gs-bugzilla690022-reduced-rotations.pdf, gs-bugzilla690022_reduced.pdf, 
> gs-bugzilla691157.pdf, gs-bugzilla691157_mod_unc.pdf, 
> gs-bugzilla691157_mod_unc.png, gs-bugzilla691348.pdf, 
> gs-bugzilla691650-2.pdf, gs-bugzilla692217_reduced.pdf, 
> gs-bugzilla693134-giant-pattern-reduced.pdf, gs-bugzilla693322_reduced.pdf, 
> gs-bugzilla694556-3.pdf, gs-bugzilla695354.pdf, 
> gs-bugzilla695582-transparency-fill-stroke.pdf, 
> gs-bugzilla695582-transparency-fill-stroke.pdf-1.png, pop-bugzilla40164.pdf, 
> samsung_galaxy_s_4_um-p1_reduced.pdf, snowman-nose-gradient-rgb.pdf, 
> snowman-nose-gradient-rgb_reduced-0.6-bad2.pdf, 
> snowman-nose-gradient-rgb_reduced-0.7-good2.pdf, 
> snowman-nose-gradient-screenshot-comparison-11.12.2016.jpg, 
> snowman-nose-gradient.pdf, snowmen-opacity-clipping-masks-2.0.3.png, 
> snowmen-opacity-clipping-masks-2.1-SNAPSHOT-10.12.2016.png, 
> snowmen-opacity-clipping-masks-2.1.0-SNAPSHOT-2016-12-07.png, 
> snowmen-opacity-clipping-masks-adobe-illustrator.png, 
> snowmen-opacity-clipping-masks.pdf, softmask-rewrite-alt1.patch, 
> softmask-rewrite.patch
>
>
> This is a follow-up issue for transparency group issues from PDFBOX-2423. 
> More details to come.



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

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



[jira] [Commented] (PDFBOX-4095) Non Separable Blend Modes implementation(HUE, SATURATION, COLOR, LUMINOSITY)

2018-02-14 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on PDFBOX-4095:
-

Commit 1824258 from [~tilman] in branch 'pdfbox/branches/2.0'
[ https://svn.apache.org/r1824258 ]

PDFBOX-4095, PDFBOX-3000: to solve the problem that some blend modes don't work 
on the page background, render pages that have blending on a temporary 
transparent ARGB image and draw that one on the target image initialized with a 
white background, as suggested by Jani Pehkonen

> Non Separable Blend Modes implementation(HUE, SATURATION, COLOR, LUMINOSITY)
> 
>
> Key: PDFBOX-4095
> URL: https://issues.apache.org/jira/browse/PDFBOX-4095
> Project: PDFBox
>  Issue Type: Improvement
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: savan patel
>Priority: Major
> Attachments: BlendComposite.java.patch, BlendMode.java.patch, 
> COSName.java.patch, blendmodes.pdf, gs-bugzilla690477.pdf, 
> gs-bugzilla697433-1.pdf
>
>
> I have a patch for implementation of non separable blend modes...



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

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



[jira] [Commented] (PDFBOX-4095) Non Separable Blend Modes implementation(HUE, SATURATION, COLOR, LUMINOSITY)

2018-02-14 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on PDFBOX-4095:
-

Commit 1824259 from [~tilman] in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1824259 ]

PDFBOX-4095, PDFBOX-3000: to solve the problem that some blend modes don't work 
on the page background, render pages that have blending on a temporary 
transparent ARGB image and draw that one on the target image initialized with a 
white background, as suggested by Jani Pehkonen

> Non Separable Blend Modes implementation(HUE, SATURATION, COLOR, LUMINOSITY)
> 
>
> Key: PDFBOX-4095
> URL: https://issues.apache.org/jira/browse/PDFBOX-4095
> Project: PDFBox
>  Issue Type: Improvement
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: savan patel
>Priority: Major
> Attachments: BlendComposite.java.patch, BlendMode.java.patch, 
> COSName.java.patch, blendmodes.pdf, gs-bugzilla690477.pdf, 
> gs-bugzilla697433-1.pdf
>
>
> I have a patch for implementation of non separable blend modes...



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

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



[jira] [Commented] (PDFBOX-4095) Non Separable Blend Modes implementation(HUE, SATURATION, COLOR, LUMINOSITY)

2018-02-14 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr commented on PDFBOX-4095:
-

As expected, the results are amazingly positive:

correct files:
- 007087-payment-due-p58.pdf: center color now accurate (lighter)
- 007087-payment-due-p58_reduced.pdf: color now accurate (darker)
- bugzilla829803.pdf: now correct, top and bottom color of the "egg" now correct
- gs-bugzilla578865.pdf: center color now accurate
- gs-bugzilla689931.pdf: now correct
- gs-bugzilla692721.pdf: now correct, grey shadow now there
- PDFBOX-2558-opp.pdf: now correct
- PDFBOX-3182.pdf: now correct
- PDFJS-6924.pdf: blue photograph now accurate (darker)

improved:
- BlendModes-rgb.pdf: all separable blending modes now good
- gs-bugzilla692766.pdf: image B2 now correct, images A3 and A4 still incorrect
- personal file 22579: more colors visible
- Isolation-rgb.pdf: upper part of "Difference" improved
- PDFBOX-2554-cmykrasterobjecttypes.pdf: parts blended to the background 
improved (didn't check whether they are correct because we don't fully support 
CMYK)
- A-Designers-Guide-to-Transparency-2007.pdf: p3: left item of "screen" now 
there; p15: purple items now there; p16: purple item top right now there
- Transparency_DesignGuide-2004.pdf: p5: left item of "overlay" now there; p20: 
purple items now there; p21: purple item top right now there

worse:
- PDFBOX-2898-Annotations.pdf: caret now yellow. PDF.js has the same problem. 
Maybe the annotations must be blended to the finished page and not to the 
"background". I'll leave this unchanged for now. Removing the /AP and letting 
Adobe create a new one brings an /AP without blending.  

not improved:
- gs-bugzilla691650-2.pdf: still incorrect
- gs-bugzilla697433-2.pdf: differently incorrect

Thank you again for your help in this matter.

> Non Separable Blend Modes implementation(HUE, SATURATION, COLOR, LUMINOSITY)
> 
>
> Key: PDFBOX-4095
> URL: https://issues.apache.org/jira/browse/PDFBOX-4095
> Project: PDFBox
>  Issue Type: Improvement
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: savan patel
>Priority: Major
> Attachments: BlendComposite.java.patch, BlendMode.java.patch, 
> COSName.java.patch, blendmodes.pdf, gs-bugzilla690477.pdf, 
> gs-bugzilla697433-1.pdf
>
>
> I have a patch for implementation of non separable blend modes...



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

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



[jira] [Commented] (PDFBOX-4106) Vertical text creation

2018-02-14 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr commented on PDFBOX-4106:
-

[~lehmi] is the license for the unicode script file ok?  
https://www.unicode.org/copyright.html#License

If not, then it shouldn't stop us; we'd just have to remote-load the file. Or 
create a table with only what we need and use that. Apache FOP does that in 
org.apache.fop.hyphenation.UnicodeClasses.

> Vertical text creation
> --
>
> Key: PDFBOX-4106
> URL: https://issues.apache.org/jira/browse/PDFBOX-4106
> Project: PDFBox
>  Issue Type: New Feature
>  Components: FontBox, Parsing, Writing
>Reporter: Aaron Madlon-Kay
>Priority: Major
>  Labels: embed, gsub, parsing, vertical
> Attachments: 
> 0001-Add-OpenTypeScript-class-to-get-OT-script-tags-for-c.patch, 
> 0002-Optimize-Unicode-script-storage-and-lookup.patch, 
> 0003-Parse-GSUB-table.patch, 
> 0004-Abstract-cmap-lookup-into-an-interface.patch, 
> 0005-Implement-GSUB-substitution-on-TrueTypeFont.patch, 
> 0006-Use-vhea-vmtx-to-fix-vertical-displacements-in-PCIDF.patch, 
> 0007-Add-factory-methods-for-loading-TTF-as-vertical-font.patch, 
> 0008-Implement-vertical-metrics-support-when-embedding-subsetting.patch, 
> sample_code.txt, vertical.pdf
>
>
> I needed to output vertical Japanese text, but was stymied by several 
> limitations:
> * No API to load a TTF as Identity-V encoding
> * No support for 'vert' glyph substitution
> * No support for vertical metrics ('vhea' and 'vmtx' tables are parsed but 
> not used at all)
> I have attached a series of patches that implement the above features. 
> Highlights:
> * The GSUB glyph substitution table is parsed (limitation: type 1 lookups 
> only; this is sufficient for many features including 'vert'/'vrt2' vertical 
> glyph substitution)
> * Cmap lookup makes use of GSUB when features are enabled on a TTF
> * 'vhea' and 'vmtx' metrics are applied to PDCIDFont when appropriate, and 
> are embedded/subsetted correctly through the DW2/W2 CIDFont dictionary
> * An API has been added for loading a TTF as a vertical font, setting 
> Identity-V encoding and enabling 'vert'/'vrt2' substitution
> Each patch could approximately be split out into a separate ticket, if 
> desired.
> Also attached is some sample code that exercises these patches and 
> illustrates the effect of vertical glyph positioning. The sample output PDF 
> is also attached.



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

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



[jira] [Reopened] (PDFBOX-2558) Image missing

2018-02-14 Thread Tilman Hausherr (JIRA)

 [ 
https://issues.apache.org/jira/browse/PDFBOX-2558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tilman Hausherr reopened PDFBOX-2558:
-

> Image missing
> -
>
> Key: PDFBOX-2558
> URL: https://issues.apache.org/jira/browse/PDFBOX-2558
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.0
>Reporter: simon steiner
>Priority: Major
> Attachments: opp.pdf
>
>
> http://acroeng.adobe.com/Test_Files/images//opp.pdf
> java -jar ~/pdf-box-svn/app/target/pdfbox-app-2.0.0-SNAPSHOT.jar PDFToImage 
> opp.pdf



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

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



[jira] [Comment Edited] (PDFBOX-2558) Image missing

2018-02-14 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr edited comment on PDFBOX-2558 at 2/14/18 4:40 PM:
--

The shapes are rendered with blend mode "Screen". The result is blank because 
of the problem described in PDFBOX-3000 (blending with the page background, 
search for "Dr. Paul Jones"). -It can't be fixed without using a different 
graphics engine.-


was (Author: tilman):
The shapes are rendered with blend mode "Screen". The result is blank because 
of the problem described in PDFBOX-3000 (blending with the page background, 
search for "Dr. Paul Jones"). It can't be fixed without using a different 
graphics engine.

> Image missing
> -
>
> Key: PDFBOX-2558
> URL: https://issues.apache.org/jira/browse/PDFBOX-2558
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.0
>Reporter: simon steiner
>Priority: Major
> Attachments: opp.pdf
>
>
> http://acroeng.adobe.com/Test_Files/images//opp.pdf
> java -jar ~/pdf-box-svn/app/target/pdfbox-app-2.0.0-SNAPSHOT.jar PDFToImage 
> opp.pdf



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

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



[jira] [Resolved] (PDFBOX-2558) Image missing

2018-02-14 Thread Tilman Hausherr (JIRA)

 [ 
https://issues.apache.org/jira/browse/PDFBOX-2558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tilman Hausherr resolved PDFBOX-2558.
-
   Resolution: Fixed
Fix Version/s: 3.0.0 PDFBox
   2.0.9

Fixed by todays commit in PDFBOX-4095, see explanation by [~janipe] of 
yesterday.

> Image missing
> -
>
> Key: PDFBOX-2558
> URL: https://issues.apache.org/jira/browse/PDFBOX-2558
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 2.0.0
>Reporter: simon steiner
>Priority: Major
> Fix For: 2.0.9, 3.0.0 PDFBox
>
> Attachments: opp.pdf
>
>
> http://acroeng.adobe.com/Test_Files/images//opp.pdf
> java -jar ~/pdf-box-svn/app/target/pdfbox-app-2.0.0-SNAPSHOT.jar PDFToImage 
> opp.pdf



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

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



[jira] [Updated] (PDFBOX-4110) PDF to JPG conversion is returning distorted images

2018-02-14 Thread Avinash (JIRA)

 [ 
https://issues.apache.org/jira/browse/PDFBOX-4110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Avinash updated PDFBOX-4110:

Attachment: flight_receipt.pdf
1000-test-2.jpg
1000-test-1.jpg

> PDF to JPG conversion is returning distorted images
> ---
>
> Key: PDFBOX-4110
> URL: https://issues.apache.org/jira/browse/PDFBOX-4110
> Project: PDFBox
>  Issue Type: Bug
>Affects Versions: 1.8.11
>Reporter: Avinash
>Priority: Blocker
> Attachments: 1000-test-1.jpg, 1000-test-2.jpg, 
> 347254-111788-437553AC1B68331C9B04E6D099E39CB5.pdf, flight_receipt.pdf
>
>
> Hello,
> We are using PDFBox-1.8.11 to convert PDFs to JPG images in our project.
> The conversion is working fine for some PDFs but for some of the PDFs, the 
> converted images in JPG format seems to be distorted (esp, flight itenary 
> PDFs).  An example of PDF is attached to this ticket for your reference 
> [347254-111788-437553AC1B68331C9B04E6D099E39CB5.pdf].
> When this PDF is converted to JPG using PDFbox API, the image returned seems 
> to be corrupted with weird characters.
>  
> Below is the code we are using for PDF to JPG conversion.
> Kindly help us to find out how this issue can be resolved. Thank you !
>  
> public String convertPDFtoJPG(String source , String filepath1, String 
> filePath2, IqiArInvoiceEventSourceVO arInvoiceEventSourceVO ) throws 
> BaseECapException{
>  
>  String newFile="";
>  
>  //IPM-5181
>  String filePathDelimiter = ";";
>  ArrayList filepaths = new ArrayList();
>  
>  {color:#FF}_try{_{color}
> {color:#FF} _PDDocument doc=PDDocument.load(new 
> FileInputStream(source));_{color}
> {color:#FF} _List 
> pages=doc.getDocumentCatalog().getAllPages();_{color}
> {color:#FF} _Iterator i= pages.iterator();_{color}
>  
> {color:#FF} _int count=1;_{color}
> {color:#FF} _while(i.hasNext()){_{color}
> {color:#FF} _PDPage page=i.next();_ {color}
> {color:#FF} _BufferedImage bi=page.convertToImage();_{color}
>  String saveFilePath = filepath1+filePath2;
>  
>  if (!new File(saveFilePath).exists()) {
>  new File(saveFilePath).mkdirs();
>  }
>  
> Thanks,
> Avinash



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

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



[jira] [Commented] (PDFBOX-4110) PDF to JPG conversion is returning distorted images

2018-02-14 Thread Avinash (JIRA)

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

Avinash commented on PDFBOX-4110:
-

Hi,

I tried to using version 1.8.13 and convertToImage with a parameter and 
re-tested but haven't noticed any change. I also tried using latest 2.0.8 
version but there was some XML parsing related error and seems it is related to 
java version. We are using Java 1.6, hence I switched back to 1.8.x.

 

Please find the original PDF  [flight_receipt.pdf] and corresponding converted 
images [1000-test-1.jpg and 1000-test-2.jpg] for your reference.

 

No, I am not using jbig2 plugin and below is the code snippet.

 

{color:#FF}_PDDocument doc=PDDocument.load(new FileInputStream(source));
 List pages=doc.getDocumentCatalog().getAllPages();
 Iterator i= pages.iterator();
 
 int count=1;
 while(i.hasNext()){
 PDPage page=i.next(); 
 BufferedImage bi=page.convertToImage( BufferedImage.TYPE_INT_RGB, 300);
 String saveFilePath = filepath1+filePath2;
 
 if (!new File(saveFilePath).exists()) {
 new File(saveFilePath).mkdirs();
 }
 
 newFile = saveFilePath + arInvoiceEventSourceVO.getSeq()+"-" +"test" +"-"+ 
count +".jpg" ;
 ImageIO.write(bi, "jpg", new File(newFile));_{color}

 

Thanks,
Avinash

> PDF to JPG conversion is returning distorted images
> ---
>
> Key: PDFBOX-4110
> URL: https://issues.apache.org/jira/browse/PDFBOX-4110
> Project: PDFBox
>  Issue Type: Bug
>Affects Versions: 1.8.11
>Reporter: Avinash
>Priority: Blocker
> Attachments: 1000-test-1.jpg, 1000-test-2.jpg, 
> 347254-111788-437553AC1B68331C9B04E6D099E39CB5.pdf, flight_receipt.pdf
>
>
> Hello,
> We are using PDFBox-1.8.11 to convert PDFs to JPG images in our project.
> The conversion is working fine for some PDFs but for some of the PDFs, the 
> converted images in JPG format seems to be distorted (esp, flight itenary 
> PDFs).  An example of PDF is attached to this ticket for your reference 
> [347254-111788-437553AC1B68331C9B04E6D099E39CB5.pdf].
> When this PDF is converted to JPG using PDFbox API, the image returned seems 
> to be corrupted with weird characters.
>  
> Below is the code we are using for PDF to JPG conversion.
> Kindly help us to find out how this issue can be resolved. Thank you !
>  
> public String convertPDFtoJPG(String source , String filepath1, String 
> filePath2, IqiArInvoiceEventSourceVO arInvoiceEventSourceVO ) throws 
> BaseECapException{
>  
>  String newFile="";
>  
>  //IPM-5181
>  String filePathDelimiter = ";";
>  ArrayList filepaths = new ArrayList();
>  
>  {color:#FF}_try{_{color}
> {color:#FF} _PDDocument doc=PDDocument.load(new 
> FileInputStream(source));_{color}
> {color:#FF} _List 
> pages=doc.getDocumentCatalog().getAllPages();_{color}
> {color:#FF} _Iterator i= pages.iterator();_{color}
>  
> {color:#FF} _int count=1;_{color}
> {color:#FF} _while(i.hasNext()){_{color}
> {color:#FF} _PDPage page=i.next();_ {color}
> {color:#FF} _BufferedImage bi=page.convertToImage();_{color}
>  String saveFilePath = filepath1+filePath2;
>  
>  if (!new File(saveFilePath).exists()) {
>  new File(saveFilePath).mkdirs();
>  }
>  
> Thanks,
> Avinash



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

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



[jira] [Comment Edited] (PDFBOX-4110) PDF to JPG conversion is returning distorted images

2018-02-14 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr edited comment on PDFBOX-4110 at 2/14/18 5:03 PM:
--

You MUST use a jbig2 plugin because the PDF file contains JBIG2 encoded images. 
And you should also find out why you don't get the log messages, which tell to 
use the jbig2 plugin. I get this when not using the jbig2 plugin:
{code:java}
Feb. 14, 2018 5:58:04 NACHM. org.apache.pdfbox.filter.JBIG2Filter decode
SCHWERWIEGEND: Can't find an ImageIO plugin to decode the JBIG2 encoded 
datastream.{code}
Get the jbig2 plugin here:
https://github.com/levigo/jbig2-imageio/releases Use 1.6.5 or earlier.
(the url will change within a few weeks, because the plugin has been donated to 
us, but the new version isn't released yet)

Then put the jar file in your classpath.
See also 
https://pdfbox.apache.org/1.8/dependencies.html

2.0 does work with jdk 1.6. Maybe ask that separately at a later time (on the 
user mailing list).


was (Author: tilman):
You MUST use a jbig2 plugin because the page contains JBIG2 encoded images. And 
you should also find out why you don't get the log messages, which tell to use 
the jbig2 plugin. I get this when not using the jbig2 plugin:
{code:java}
Feb. 14, 2018 5:58:04 NACHM. org.apache.pdfbox.filter.JBIG2Filter decode
SCHWERWIEGEND: Can't find an ImageIO plugin to decode the JBIG2 encoded 
datastream.{code}
Get the jbig2 plugin here:
https://github.com/levigo/jbig2-imageio/releases Use 1.6.5 or earlier.
(the url will change within a few weeks, because the plugin has been donated to 
us, but the new version isn't released yet)

Then put the jar file in your classpath.
See also 
https://pdfbox.apache.org/1.8/dependencies.html

2.0 does work with jdk 1.6. Maybe ask that separately at a later time (on the 
user mailing list).

> PDF to JPG conversion is returning distorted images
> ---
>
> Key: PDFBOX-4110
> URL: https://issues.apache.org/jira/browse/PDFBOX-4110
> Project: PDFBox
>  Issue Type: Bug
>Affects Versions: 1.8.11
>Reporter: Avinash
>Priority: Blocker
> Attachments: 1000-test-1.jpg, 1000-test-2.jpg, 
> 347254-111788-437553AC1B68331C9B04E6D099E39CB5.pdf, flight_receipt.pdf
>
>
> Hello,
> We are using PDFBox-1.8.11 to convert PDFs to JPG images in our project.
> The conversion is working fine for some PDFs but for some of the PDFs, the 
> converted images in JPG format seems to be distorted (esp, flight itenary 
> PDFs).  An example of PDF is attached to this ticket for your reference 
> [347254-111788-437553AC1B68331C9B04E6D099E39CB5.pdf].
> When this PDF is converted to JPG using PDFbox API, the image returned seems 
> to be corrupted with weird characters.
>  
> Below is the code we are using for PDF to JPG conversion.
> Kindly help us to find out how this issue can be resolved. Thank you !
>  
> public String convertPDFtoJPG(String source , String filepath1, String 
> filePath2, IqiArInvoiceEventSourceVO arInvoiceEventSourceVO ) throws 
> BaseECapException{
>  
>  String newFile="";
>  
>  //IPM-5181
>  String filePathDelimiter = ";";
>  ArrayList filepaths = new ArrayList();
>  
>  {color:#FF}_try{_{color}
> {color:#FF} _PDDocument doc=PDDocument.load(new 
> FileInputStream(source));_{color}
> {color:#FF} _List 
> pages=doc.getDocumentCatalog().getAllPages();_{color}
> {color:#FF} _Iterator i= pages.iterator();_{color}
>  
> {color:#FF} _int count=1;_{color}
> {color:#FF} _while(i.hasNext()){_{color}
> {color:#FF} _PDPage page=i.next();_ {color}
> {color:#FF} _BufferedImage bi=page.convertToImage();_{color}
>  String saveFilePath = filepath1+filePath2;
>  
>  if (!new File(saveFilePath).exists()) {
>  new File(saveFilePath).mkdirs();
>  }
>  
> Thanks,
> Avinash



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

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



[jira] [Commented] (PDFBOX-4110) PDF to JPG conversion is returning distorted images

2018-02-14 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr commented on PDFBOX-4110:
-

You MUST use a jbig2 plugin because the page contains JBIG2 encoded images. And 
you should also find out why you don't get the log messages, which tell to use 
the jbig2 plugin. I get this when not using the jbig2 plugin:
{code:java}
Feb. 14, 2018 5:58:04 NACHM. org.apache.pdfbox.filter.JBIG2Filter decode
SCHWERWIEGEND: Can't find an ImageIO plugin to decode the JBIG2 encoded 
datastream.{code}
Get the jbig2 plugin here:
https://github.com/levigo/jbig2-imageio/releases Use 1.6.5 or earlier.
(the url will change within a few weeks, because the plugin has been donated to 
us, but the new version isn't released yet)

Then put the jar file in your classpath.
See also 
https://pdfbox.apache.org/1.8/dependencies.html

2.0 does work with jdk 1.6. Maybe ask that separately at a later time (on the 
user mailing list).

> PDF to JPG conversion is returning distorted images
> ---
>
> Key: PDFBOX-4110
> URL: https://issues.apache.org/jira/browse/PDFBOX-4110
> Project: PDFBox
>  Issue Type: Bug
>Affects Versions: 1.8.11
>Reporter: Avinash
>Priority: Blocker
> Attachments: 1000-test-1.jpg, 1000-test-2.jpg, 
> 347254-111788-437553AC1B68331C9B04E6D099E39CB5.pdf, flight_receipt.pdf
>
>
> Hello,
> We are using PDFBox-1.8.11 to convert PDFs to JPG images in our project.
> The conversion is working fine for some PDFs but for some of the PDFs, the 
> converted images in JPG format seems to be distorted (esp, flight itenary 
> PDFs).  An example of PDF is attached to this ticket for your reference 
> [347254-111788-437553AC1B68331C9B04E6D099E39CB5.pdf].
> When this PDF is converted to JPG using PDFbox API, the image returned seems 
> to be corrupted with weird characters.
>  
> Below is the code we are using for PDF to JPG conversion.
> Kindly help us to find out how this issue can be resolved. Thank you !
>  
> public String convertPDFtoJPG(String source , String filepath1, String 
> filePath2, IqiArInvoiceEventSourceVO arInvoiceEventSourceVO ) throws 
> BaseECapException{
>  
>  String newFile="";
>  
>  //IPM-5181
>  String filePathDelimiter = ";";
>  ArrayList filepaths = new ArrayList();
>  
>  {color:#FF}_try{_{color}
> {color:#FF} _PDDocument doc=PDDocument.load(new 
> FileInputStream(source));_{color}
> {color:#FF} _List 
> pages=doc.getDocumentCatalog().getAllPages();_{color}
> {color:#FF} _Iterator i= pages.iterator();_{color}
>  
> {color:#FF} _int count=1;_{color}
> {color:#FF} _while(i.hasNext()){_{color}
> {color:#FF} _PDPage page=i.next();_ {color}
> {color:#FF} _BufferedImage bi=page.convertToImage();_{color}
>  String saveFilePath = filepath1+filePath2;
>  
>  if (!new File(saveFilePath).exists()) {
>  new File(saveFilePath).mkdirs();
>  }
>  
> Thanks,
> Avinash



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

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



[jira] [Commented] (PDFBOX-4110) PDF to JPG conversion is returning distorted images

2018-02-14 Thread Avinash (JIRA)

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

Avinash commented on PDFBOX-4110:
-

Awesome !!

I included jbig2 plugin in my project and now the images are converted 
perfectly fine.

Thanks a lot for the help (y).

 

Thank you,

Avinash

> PDF to JPG conversion is returning distorted images
> ---
>
> Key: PDFBOX-4110
> URL: https://issues.apache.org/jira/browse/PDFBOX-4110
> Project: PDFBox
>  Issue Type: Bug
>Affects Versions: 1.8.11
>Reporter: Avinash
>Priority: Blocker
> Attachments: 1000-test-1.jpg, 1000-test-2.jpg, 
> 347254-111788-437553AC1B68331C9B04E6D099E39CB5.pdf, flight_receipt.pdf
>
>
> Hello,
> We are using PDFBox-1.8.11 to convert PDFs to JPG images in our project.
> The conversion is working fine for some PDFs but for some of the PDFs, the 
> converted images in JPG format seems to be distorted (esp, flight itenary 
> PDFs).  An example of PDF is attached to this ticket for your reference 
> [347254-111788-437553AC1B68331C9B04E6D099E39CB5.pdf].
> When this PDF is converted to JPG using PDFbox API, the image returned seems 
> to be corrupted with weird characters.
>  
> Below is the code we are using for PDF to JPG conversion.
> Kindly help us to find out how this issue can be resolved. Thank you !
>  
> public String convertPDFtoJPG(String source , String filepath1, String 
> filePath2, IqiArInvoiceEventSourceVO arInvoiceEventSourceVO ) throws 
> BaseECapException{
>  
>  String newFile="";
>  
>  //IPM-5181
>  String filePathDelimiter = ";";
>  ArrayList filepaths = new ArrayList();
>  
>  {color:#FF}_try{_{color}
> {color:#FF} _PDDocument doc=PDDocument.load(new 
> FileInputStream(source));_{color}
> {color:#FF} _List 
> pages=doc.getDocumentCatalog().getAllPages();_{color}
> {color:#FF} _Iterator i= pages.iterator();_{color}
>  
> {color:#FF} _int count=1;_{color}
> {color:#FF} _while(i.hasNext()){_{color}
> {color:#FF} _PDPage page=i.next();_ {color}
> {color:#FF} _BufferedImage bi=page.convertToImage();_{color}
>  String saveFilePath = filepath1+filePath2;
>  
>  if (!new File(saveFilePath).exists()) {
>  new File(saveFilePath).mkdirs();
>  }
>  
> Thanks,
> Avinash



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

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



[jira] [Commented] (PDFBOX-4106) Vertical text creation

2018-02-14 Thread JIRA

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

Andreas Lehmkühler commented on PDFBOX-4106:


{quote}is the license for the unicode script file ok?{quote}

Yes, it is, see the so called [category-a 
licenses|http://www.apache.org/legal/resolved#category-a]

> Vertical text creation
> --
>
> Key: PDFBOX-4106
> URL: https://issues.apache.org/jira/browse/PDFBOX-4106
> Project: PDFBox
>  Issue Type: New Feature
>  Components: FontBox, Parsing, Writing
>Reporter: Aaron Madlon-Kay
>Priority: Major
>  Labels: embed, gsub, parsing, vertical
> Attachments: 
> 0001-Add-OpenTypeScript-class-to-get-OT-script-tags-for-c.patch, 
> 0002-Optimize-Unicode-script-storage-and-lookup.patch, 
> 0003-Parse-GSUB-table.patch, 
> 0004-Abstract-cmap-lookup-into-an-interface.patch, 
> 0005-Implement-GSUB-substitution-on-TrueTypeFont.patch, 
> 0006-Use-vhea-vmtx-to-fix-vertical-displacements-in-PCIDF.patch, 
> 0007-Add-factory-methods-for-loading-TTF-as-vertical-font.patch, 
> 0008-Implement-vertical-metrics-support-when-embedding-subsetting.patch, 
> sample_code.txt, vertical.pdf
>
>
> I needed to output vertical Japanese text, but was stymied by several 
> limitations:
> * No API to load a TTF as Identity-V encoding
> * No support for 'vert' glyph substitution
> * No support for vertical metrics ('vhea' and 'vmtx' tables are parsed but 
> not used at all)
> I have attached a series of patches that implement the above features. 
> Highlights:
> * The GSUB glyph substitution table is parsed (limitation: type 1 lookups 
> only; this is sufficient for many features including 'vert'/'vrt2' vertical 
> glyph substitution)
> * Cmap lookup makes use of GSUB when features are enabled on a TTF
> * 'vhea' and 'vmtx' metrics are applied to PDCIDFont when appropriate, and 
> are embedded/subsetted correctly through the DW2/W2 CIDFont dictionary
> * An API has been added for loading a TTF as a vertical font, setting 
> Identity-V encoding and enabling 'vert'/'vrt2' substitution
> Each patch could approximately be split out into a separate ticket, if 
> desired.
> Also attached is some sample code that exercises these patches and 
> illustrates the effect of vertical glyph positioning. The sample output PDF 
> is also attached.



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

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



[jira] [Assigned] (PDFBOX-4094) Add support for a flag disabling the rendering of PDF annotations in PDFRenderer

2018-02-14 Thread Maruan Sahyoun (JIRA)

 [ 
https://issues.apache.org/jira/browse/PDFBOX-4094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maruan Sahyoun reassigned PDFBOX-4094:
--

Assignee: Maruan Sahyoun

> Add support for a flag disabling the rendering of PDF annotations in 
> PDFRenderer
> 
>
> Key: PDFBOX-4094
> URL: https://issues.apache.org/jira/browse/PDFBOX-4094
> Project: PDFBox
>  Issue Type: Wish
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Maxime Veron
>Assignee: Maruan Sahyoun
>Priority: Minor
> Fix For: 2.0.9, 3.0.0 PDFBox
>
> Attachments: 
> 0001-PDFBOX-4094-comment-Modify-PDFRenderer-in-order-to-a.patch
>
>
> Regardless if annotations are supposed to be printed or not on the PDF, would 
> it not be interesting to possess a flag allowing to choose if annotations 
> should be printed on top of the document pages?
>  
> Here is a diff of a very rough implementation of it : 
>  
> {code:java}
> diff --git 
> a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java 
> b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java
> --- a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java
> +++ b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java
> @@ -35,6 +35,9 @@ public class PDFRenderer
>  protected final PDDocument document;
>  // TODO keep rendering state such as caches here
>  
> +// parameter used to know if the rendering should include annotations 
> +private boolean renderAnnotations = true;
> +
>  /**
>   * Creates a new PDFRenderer.
>   * @param document the document to render
> @@ -224,4 +227,14 @@ public class PDFRenderer
>  {
>  return new PageDrawer(parameters);
>  }
> +
> +public void setRenderAnnotations(boolean render) 
> +{
> +this.renderAnnotations = render;
> +}
> +
> +public boolean renderAnnotations() 
> +{
> +return renderAnnotations;
> +}
>  }
> diff --git a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java 
> b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
> --- a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
> +++ b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
> @@ -195,11 +195,13 @@ public class PageDrawer extends PDFGraphicsStreamEngine
>  
>  processPage(getPage());
>  
> -for (PDAnnotation annotation : getPage().getAnnotations())
> -{
> -showAnnotation(annotation);
> +if (getRenderer().renderAnnotations()) 
> +{ 
> +for (PDAnnotation annotation : getPage().getAnnotations())
> +{
> +showAnnotation(annotation);
> +}
>  }
> -
>  graphics = null;
>  }
>  
> {code}
> And an exemple of a use case: 
> {code:java}
> PDDocument doc = getPDDocument(); 
> PDFRenderer pdfRenderer = new PDFRenderer(doc);
> pdfRenderer.setRenderAnnotations(false);
> pdfRenderer.renderImage(page);
>  
> {code}
> By default, this would be keeping the same behavior as it used to (aka : 
> print the annotations) but possess an opt-out feature.
>  
> Best regards,
> M.Veron



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

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



[jira] [Updated] (PDFBOX-4094) Add support for a flag disabling the rendering of PDF annotations in PDFRenderer

2018-02-14 Thread Maruan Sahyoun (JIRA)

 [ 
https://issues.apache.org/jira/browse/PDFBOX-4094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maruan Sahyoun updated PDFBOX-4094:
---
Fix Version/s: 3.0.0 PDFBox
   2.0.9

> Add support for a flag disabling the rendering of PDF annotations in 
> PDFRenderer
> 
>
> Key: PDFBOX-4094
> URL: https://issues.apache.org/jira/browse/PDFBOX-4094
> Project: PDFBox
>  Issue Type: Wish
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Maxime Veron
>Assignee: Maruan Sahyoun
>Priority: Minor
> Fix For: 2.0.9, 3.0.0 PDFBox
>
> Attachments: 
> 0001-PDFBOX-4094-comment-Modify-PDFRenderer-in-order-to-a.patch
>
>
> Regardless if annotations are supposed to be printed or not on the PDF, would 
> it not be interesting to possess a flag allowing to choose if annotations 
> should be printed on top of the document pages?
>  
> Here is a diff of a very rough implementation of it : 
>  
> {code:java}
> diff --git 
> a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java 
> b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java
> --- a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java
> +++ b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java
> @@ -35,6 +35,9 @@ public class PDFRenderer
>  protected final PDDocument document;
>  // TODO keep rendering state such as caches here
>  
> +// parameter used to know if the rendering should include annotations 
> +private boolean renderAnnotations = true;
> +
>  /**
>   * Creates a new PDFRenderer.
>   * @param document the document to render
> @@ -224,4 +227,14 @@ public class PDFRenderer
>  {
>  return new PageDrawer(parameters);
>  }
> +
> +public void setRenderAnnotations(boolean render) 
> +{
> +this.renderAnnotations = render;
> +}
> +
> +public boolean renderAnnotations() 
> +{
> +return renderAnnotations;
> +}
>  }
> diff --git a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java 
> b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
> --- a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
> +++ b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
> @@ -195,11 +195,13 @@ public class PageDrawer extends PDFGraphicsStreamEngine
>  
>  processPage(getPage());
>  
> -for (PDAnnotation annotation : getPage().getAnnotations())
> -{
> -showAnnotation(annotation);
> +if (getRenderer().renderAnnotations()) 
> +{ 
> +for (PDAnnotation annotation : getPage().getAnnotations())
> +{
> +showAnnotation(annotation);
> +}
>  }
> -
>  graphics = null;
>  }
>  
> {code}
> And an exemple of a use case: 
> {code:java}
> PDDocument doc = getPDDocument(); 
> PDFRenderer pdfRenderer = new PDFRenderer(doc);
> pdfRenderer.setRenderAnnotations(false);
> pdfRenderer.renderImage(page);
>  
> {code}
> By default, this would be keeping the same behavior as it used to (aka : 
> print the annotations) but possess an opt-out feature.
>  
> Best regards,
> M.Veron



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

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



[jira] [Commented] (PDFBOX-4094) Add support for a flag disabling the rendering of PDF annotations in PDFRenderer

2018-02-14 Thread Maruan Sahyoun (JIRA)

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

Maruan Sahyoun commented on PDFBOX-4094:


[~lehmi] are we fine with taking that patch without an ICLA? IMHO it's small 
enough.

[~mveron] thanks for the contribution. I'll apply it later tomorrow with some 
minor changes.
- the {{AnnotationsFilter}} shouldn't be part of the 
{{org.apache.pdfbox.filter}} package as this is related to io. I'll put it in 
the {{.interactive.annotation}} package
- I'll add the setter/getter to {{PageDrawer}} too as the line {{for 
(PDAnnotation annotation : 
getPage().getAnnotations(getRenderer().getAnnotationsFilter()))}} introduces a 
dependency on {{PageRenderer}}. Given the comment in the source code of 
{{PageDrawer}} we might be removing the {{PageRenderer}} at some point in time 
as a member on {{PageDrawer}}.

Again thank you very much for your help

> Add support for a flag disabling the rendering of PDF annotations in 
> PDFRenderer
> 
>
> Key: PDFBOX-4094
> URL: https://issues.apache.org/jira/browse/PDFBOX-4094
> Project: PDFBox
>  Issue Type: Wish
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Maxime Veron
>Assignee: Maruan Sahyoun
>Priority: Minor
> Fix For: 2.0.9, 3.0.0 PDFBox
>
> Attachments: 
> 0001-PDFBOX-4094-comment-Modify-PDFRenderer-in-order-to-a.patch
>
>
> Regardless if annotations are supposed to be printed or not on the PDF, would 
> it not be interesting to possess a flag allowing to choose if annotations 
> should be printed on top of the document pages?
>  
> Here is a diff of a very rough implementation of it : 
>  
> {code:java}
> diff --git 
> a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java 
> b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java
> --- a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java
> +++ b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java
> @@ -35,6 +35,9 @@ public class PDFRenderer
>  protected final PDDocument document;
>  // TODO keep rendering state such as caches here
>  
> +// parameter used to know if the rendering should include annotations 
> +private boolean renderAnnotations = true;
> +
>  /**
>   * Creates a new PDFRenderer.
>   * @param document the document to render
> @@ -224,4 +227,14 @@ public class PDFRenderer
>  {
>  return new PageDrawer(parameters);
>  }
> +
> +public void setRenderAnnotations(boolean render) 
> +{
> +this.renderAnnotations = render;
> +}
> +
> +public boolean renderAnnotations() 
> +{
> +return renderAnnotations;
> +}
>  }
> diff --git a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java 
> b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
> --- a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
> +++ b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
> @@ -195,11 +195,13 @@ public class PageDrawer extends PDFGraphicsStreamEngine
>  
>  processPage(getPage());
>  
> -for (PDAnnotation annotation : getPage().getAnnotations())
> -{
> -showAnnotation(annotation);
> +if (getRenderer().renderAnnotations()) 
> +{ 
> +for (PDAnnotation annotation : getPage().getAnnotations())
> +{
> +showAnnotation(annotation);
> +}
>  }
> -
>  graphics = null;
>  }
>  
> {code}
> And an exemple of a use case: 
> {code:java}
> PDDocument doc = getPDDocument(); 
> PDFRenderer pdfRenderer = new PDFRenderer(doc);
> pdfRenderer.setRenderAnnotations(false);
> pdfRenderer.renderImage(page);
>  
> {code}
> By default, this would be keeping the same behavior as it used to (aka : 
> print the annotations) but possess an opt-out feature.
>  
> Best regards,
> M.Veron



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

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



[jira] [Comment Edited] (PDFBOX-4094) Add support for a flag disabling the rendering of PDF annotations in PDFRenderer

2018-02-14 Thread Maruan Sahyoun (JIRA)

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

Maruan Sahyoun edited comment on PDFBOX-4094 at 2/14/18 6:16 PM:
-

[~lehmi] are we fine with taking that patch without an ICLA? IMHO it's small 
enough.

[~mveron] thanks for the contribution. I'll apply it later tomorrow with some 
minor changes.
- the {{AnnotationsFilter}} shouldn't be part of the 
{{org.apache.pdfbox.filter}} package as this is related to io. I'll put it in 
the {{.interactive.annotation}} package
- I'll add the setter/getter to {{PageDrawer}} too as the line {{for 
(PDAnnotation annotation : 
getPage().getAnnotations(getRenderer().getAnnotationsFilter()))}} introduces a 
dependency on {{PageRenderer}}. Given the comment in the source code of 
{{PageDrawer}} we might be removing the {{PageRenderer}} at some point in time 
as a member in {{PageDrawer}}.

Again thank you very much for your help


was (Author: msahyoun):
[~lehmi] are we fine with taking that patch without an ICLA? IMHO it's small 
enough.

[~mveron] thanks for the contribution. I'll apply it later tomorrow with some 
minor changes.
- the {{AnnotationsFilter}} shouldn't be part of the 
{{org.apache.pdfbox.filter}} package as this is related to io. I'll put it in 
the {{.interactive.annotation}} package
- I'll add the setter/getter to {{PageDrawer}} too as the line {{for 
(PDAnnotation annotation : 
getPage().getAnnotations(getRenderer().getAnnotationsFilter()))}} introduces a 
dependency on {{PageRenderer}}. Given the comment in the source code of 
{{PageDrawer}} we might be removing the {{PageRenderer}} at some point in time 
as a member on {{PageDrawer}}.

Again thank you very much for your help

> Add support for a flag disabling the rendering of PDF annotations in 
> PDFRenderer
> 
>
> Key: PDFBOX-4094
> URL: https://issues.apache.org/jira/browse/PDFBOX-4094
> Project: PDFBox
>  Issue Type: Wish
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Maxime Veron
>Assignee: Maruan Sahyoun
>Priority: Minor
> Fix For: 2.0.9, 3.0.0 PDFBox
>
> Attachments: 
> 0001-PDFBOX-4094-comment-Modify-PDFRenderer-in-order-to-a.patch
>
>
> Regardless if annotations are supposed to be printed or not on the PDF, would 
> it not be interesting to possess a flag allowing to choose if annotations 
> should be printed on top of the document pages?
>  
> Here is a diff of a very rough implementation of it : 
>  
> {code:java}
> diff --git 
> a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java 
> b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java
> --- a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java
> +++ b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java
> @@ -35,6 +35,9 @@ public class PDFRenderer
>  protected final PDDocument document;
>  // TODO keep rendering state such as caches here
>  
> +// parameter used to know if the rendering should include annotations 
> +private boolean renderAnnotations = true;
> +
>  /**
>   * Creates a new PDFRenderer.
>   * @param document the document to render
> @@ -224,4 +227,14 @@ public class PDFRenderer
>  {
>  return new PageDrawer(parameters);
>  }
> +
> +public void setRenderAnnotations(boolean render) 
> +{
> +this.renderAnnotations = render;
> +}
> +
> +public boolean renderAnnotations() 
> +{
> +return renderAnnotations;
> +}
>  }
> diff --git a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java 
> b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
> --- a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
> +++ b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
> @@ -195,11 +195,13 @@ public class PageDrawer extends PDFGraphicsStreamEngine
>  
>  processPage(getPage());
>  
> -for (PDAnnotation annotation : getPage().getAnnotations())
> -{
> -showAnnotation(annotation);
> +if (getRenderer().renderAnnotations()) 
> +{ 
> +for (PDAnnotation annotation : getPage().getAnnotations())
> +{
> +showAnnotation(annotation);
> +}
>  }
> -
>  graphics = null;
>  }
>  
> {code}
> And an exemple of a use case: 
> {code:java}
> PDDocument doc = getPDDocument(); 
> PDFRenderer pdfRenderer = new PDFRenderer(doc);
> pdfRenderer.setRenderAnnotations(false);
> pdfRenderer.renderImage(page);
>  
> {code}
> By default, this would be keeping the same behavior as it used to (aka : 
> print the annotations) but possess an opt-out feature.
>  
> Best r

[jira] [Commented] (PDFBOX-4094) Add support for a flag disabling the rendering of PDF annotations in PDFRenderer

2018-02-14 Thread Maruan Sahyoun (JIRA)

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

Maruan Sahyoun commented on PDFBOX-4094:


[~mveron] Would it be possible to provide a small test file and a unit test for 
PDPage to retrieve the annotations with/without an AnnotationsFilter? Sorry to 
be so demanding.

> Add support for a flag disabling the rendering of PDF annotations in 
> PDFRenderer
> 
>
> Key: PDFBOX-4094
> URL: https://issues.apache.org/jira/browse/PDFBOX-4094
> Project: PDFBox
>  Issue Type: Wish
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Maxime Veron
>Assignee: Maruan Sahyoun
>Priority: Minor
> Fix For: 2.0.9, 3.0.0 PDFBox
>
> Attachments: 
> 0001-PDFBOX-4094-comment-Modify-PDFRenderer-in-order-to-a.patch
>
>
> Regardless if annotations are supposed to be printed or not on the PDF, would 
> it not be interesting to possess a flag allowing to choose if annotations 
> should be printed on top of the document pages?
>  
> Here is a diff of a very rough implementation of it : 
>  
> {code:java}
> diff --git 
> a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java 
> b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java
> --- a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java
> +++ b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java
> @@ -35,6 +35,9 @@ public class PDFRenderer
>  protected final PDDocument document;
>  // TODO keep rendering state such as caches here
>  
> +// parameter used to know if the rendering should include annotations 
> +private boolean renderAnnotations = true;
> +
>  /**
>   * Creates a new PDFRenderer.
>   * @param document the document to render
> @@ -224,4 +227,14 @@ public class PDFRenderer
>  {
>  return new PageDrawer(parameters);
>  }
> +
> +public void setRenderAnnotations(boolean render) 
> +{
> +this.renderAnnotations = render;
> +}
> +
> +public boolean renderAnnotations() 
> +{
> +return renderAnnotations;
> +}
>  }
> diff --git a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java 
> b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
> --- a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
> +++ b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
> @@ -195,11 +195,13 @@ public class PageDrawer extends PDFGraphicsStreamEngine
>  
>  processPage(getPage());
>  
> -for (PDAnnotation annotation : getPage().getAnnotations())
> -{
> -showAnnotation(annotation);
> +if (getRenderer().renderAnnotations()) 
> +{ 
> +for (PDAnnotation annotation : getPage().getAnnotations())
> +{
> +showAnnotation(annotation);
> +}
>  }
> -
>  graphics = null;
>  }
>  
> {code}
> And an exemple of a use case: 
> {code:java}
> PDDocument doc = getPDDocument(); 
> PDFRenderer pdfRenderer = new PDFRenderer(doc);
> pdfRenderer.setRenderAnnotations(false);
> pdfRenderer.renderImage(page);
>  
> {code}
> By default, this would be keeping the same behavior as it used to (aka : 
> print the annotations) but possess an opt-out feature.
>  
> Best regards,
> M.Veron



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

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



[jira] [Commented] (PDFBOX-4094) Add support for a flag disabling the rendering of PDF annotations in PDFRenderer

2018-02-14 Thread JIRA

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

Andreas Lehmkühler commented on PDFBOX-4094:


bq. are we fine with taking that patch without an ICLA? IMHO it's small enough.
Everything is fine, no iCLA needed

> Add support for a flag disabling the rendering of PDF annotations in 
> PDFRenderer
> 
>
> Key: PDFBOX-4094
> URL: https://issues.apache.org/jira/browse/PDFBOX-4094
> Project: PDFBox
>  Issue Type: Wish
>  Components: Rendering
>Affects Versions: 2.0.8
>Reporter: Maxime Veron
>Assignee: Maruan Sahyoun
>Priority: Minor
> Fix For: 2.0.9, 3.0.0 PDFBox
>
> Attachments: 
> 0001-PDFBOX-4094-comment-Modify-PDFRenderer-in-order-to-a.patch
>
>
> Regardless if annotations are supposed to be printed or not on the PDF, would 
> it not be interesting to possess a flag allowing to choose if annotations 
> should be printed on top of the document pages?
>  
> Here is a diff of a very rough implementation of it : 
>  
> {code:java}
> diff --git 
> a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java 
> b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java
> --- a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java
> +++ b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PDFRenderer.java
> @@ -35,6 +35,9 @@ public class PDFRenderer
>  protected final PDDocument document;
>  // TODO keep rendering state such as caches here
>  
> +// parameter used to know if the rendering should include annotations 
> +private boolean renderAnnotations = true;
> +
>  /**
>   * Creates a new PDFRenderer.
>   * @param document the document to render
> @@ -224,4 +227,14 @@ public class PDFRenderer
>  {
>  return new PageDrawer(parameters);
>  }
> +
> +public void setRenderAnnotations(boolean render) 
> +{
> +this.renderAnnotations = render;
> +}
> +
> +public boolean renderAnnotations() 
> +{
> +return renderAnnotations;
> +}
>  }
> diff --git a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java 
> b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
> --- a/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
> +++ b/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
> @@ -195,11 +195,13 @@ public class PageDrawer extends PDFGraphicsStreamEngine
>  
>  processPage(getPage());
>  
> -for (PDAnnotation annotation : getPage().getAnnotations())
> -{
> -showAnnotation(annotation);
> +if (getRenderer().renderAnnotations()) 
> +{ 
> +for (PDAnnotation annotation : getPage().getAnnotations())
> +{
> +showAnnotation(annotation);
> +}
>  }
> -
>  graphics = null;
>  }
>  
> {code}
> And an exemple of a use case: 
> {code:java}
> PDDocument doc = getPDDocument(); 
> PDFRenderer pdfRenderer = new PDFRenderer(doc);
> pdfRenderer.setRenderAnnotations(false);
> pdfRenderer.renderImage(page);
>  
> {code}
> By default, this would be keeping the same behavior as it used to (aka : 
> print the annotations) but possess an opt-out feature.
>  
> Best regards,
> M.Veron



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

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



[jira] [Updated] (PDFBOX-4110) PDF to JPG conversion is returning distorted images

2018-02-14 Thread Tilman Hausherr (JIRA)

 [ 
https://issues.apache.org/jira/browse/PDFBOX-4110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tilman Hausherr updated PDFBOX-4110:

Component/s: Rendering

> PDF to JPG conversion is returning distorted images
> ---
>
> Key: PDFBOX-4110
> URL: https://issues.apache.org/jira/browse/PDFBOX-4110
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 1.8.11
>Reporter: Avinash
>Priority: Blocker
> Attachments: 1000-test-1.jpg, 1000-test-2.jpg, 
> 347254-111788-437553AC1B68331C9B04E6D099E39CB5.pdf, flight_receipt.pdf
>
>
> Hello,
> We are using PDFBox-1.8.11 to convert PDFs to JPG images in our project.
> The conversion is working fine for some PDFs but for some of the PDFs, the 
> converted images in JPG format seems to be distorted (esp, flight itenary 
> PDFs).  An example of PDF is attached to this ticket for your reference 
> [347254-111788-437553AC1B68331C9B04E6D099E39CB5.pdf].
> When this PDF is converted to JPG using PDFbox API, the image returned seems 
> to be corrupted with weird characters.
>  
> Below is the code we are using for PDF to JPG conversion.
> Kindly help us to find out how this issue can be resolved. Thank you !
>  
> public String convertPDFtoJPG(String source , String filepath1, String 
> filePath2, IqiArInvoiceEventSourceVO arInvoiceEventSourceVO ) throws 
> BaseECapException{
>  
>  String newFile="";
>  
>  //IPM-5181
>  String filePathDelimiter = ";";
>  ArrayList filepaths = new ArrayList();
>  
>  {color:#FF}_try{_{color}
> {color:#FF} _PDDocument doc=PDDocument.load(new 
> FileInputStream(source));_{color}
> {color:#FF} _List 
> pages=doc.getDocumentCatalog().getAllPages();_{color}
> {color:#FF} _Iterator i= pages.iterator();_{color}
>  
> {color:#FF} _int count=1;_{color}
> {color:#FF} _while(i.hasNext()){_{color}
> {color:#FF} _PDPage page=i.next();_ {color}
> {color:#FF} _BufferedImage bi=page.convertToImage();_{color}
>  String saveFilePath = filepath1+filePath2;
>  
>  if (!new File(saveFilePath).exists()) {
>  new File(saveFilePath).mkdirs();
>  }
>  
> Thanks,
> Avinash



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

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



[jira] [Updated] (PDFBOX-4110) PDF to JPG conversion is returning distorted images

2018-02-14 Thread Tilman Hausherr (JIRA)

 [ 
https://issues.apache.org/jira/browse/PDFBOX-4110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tilman Hausherr updated PDFBOX-4110:

Labels: JBIG2 jbig2  (was: )

> PDF to JPG conversion is returning distorted images
> ---
>
> Key: PDFBOX-4110
> URL: https://issues.apache.org/jira/browse/PDFBOX-4110
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 1.8.11
>Reporter: Avinash
>Priority: Blocker
>  Labels: JBIG2, jbig2
> Attachments: 1000-test-1.jpg, 1000-test-2.jpg, 
> 347254-111788-437553AC1B68331C9B04E6D099E39CB5.pdf, flight_receipt.pdf
>
>
> Hello,
> We are using PDFBox-1.8.11 to convert PDFs to JPG images in our project.
> The conversion is working fine for some PDFs but for some of the PDFs, the 
> converted images in JPG format seems to be distorted (esp, flight itenary 
> PDFs).  An example of PDF is attached to this ticket for your reference 
> [347254-111788-437553AC1B68331C9B04E6D099E39CB5.pdf].
> When this PDF is converted to JPG using PDFbox API, the image returned seems 
> to be corrupted with weird characters.
>  
> Below is the code we are using for PDF to JPG conversion.
> Kindly help us to find out how this issue can be resolved. Thank you !
>  
> public String convertPDFtoJPG(String source , String filepath1, String 
> filePath2, IqiArInvoiceEventSourceVO arInvoiceEventSourceVO ) throws 
> BaseECapException{
>  
>  String newFile="";
>  
>  //IPM-5181
>  String filePathDelimiter = ";";
>  ArrayList filepaths = new ArrayList();
>  
>  {color:#FF}_try{_{color}
> {color:#FF} _PDDocument doc=PDDocument.load(new 
> FileInputStream(source));_{color}
> {color:#FF} _List 
> pages=doc.getDocumentCatalog().getAllPages();_{color}
> {color:#FF} _Iterator i= pages.iterator();_{color}
>  
> {color:#FF} _int count=1;_{color}
> {color:#FF} _while(i.hasNext()){_{color}
> {color:#FF} _PDPage page=i.next();_ {color}
> {color:#FF} _BufferedImage bi=page.convertToImage();_{color}
>  String saveFilePath = filepath1+filePath2;
>  
>  if (!new File(saveFilePath).exists()) {
>  new File(saveFilePath).mkdirs();
>  }
>  
> Thanks,
> Avinash



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

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



[jira] [Closed] (PDFBOX-4110) PDF to JPG conversion is returning distorted images

2018-02-14 Thread Tilman Hausherr (JIRA)

 [ 
https://issues.apache.org/jira/browse/PDFBOX-4110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tilman Hausherr closed PDFBOX-4110.
---
Resolution: Not A Bug

> PDF to JPG conversion is returning distorted images
> ---
>
> Key: PDFBOX-4110
> URL: https://issues.apache.org/jira/browse/PDFBOX-4110
> Project: PDFBox
>  Issue Type: Bug
>  Components: Rendering
>Affects Versions: 1.8.11
>Reporter: Avinash
>Priority: Blocker
>  Labels: JBIG2, jbig2
> Attachments: 1000-test-1.jpg, 1000-test-2.jpg, 
> 347254-111788-437553AC1B68331C9B04E6D099E39CB5.pdf, flight_receipt.pdf
>
>
> Hello,
> We are using PDFBox-1.8.11 to convert PDFs to JPG images in our project.
> The conversion is working fine for some PDFs but for some of the PDFs, the 
> converted images in JPG format seems to be distorted (esp, flight itenary 
> PDFs).  An example of PDF is attached to this ticket for your reference 
> [347254-111788-437553AC1B68331C9B04E6D099E39CB5.pdf].
> When this PDF is converted to JPG using PDFbox API, the image returned seems 
> to be corrupted with weird characters.
>  
> Below is the code we are using for PDF to JPG conversion.
> Kindly help us to find out how this issue can be resolved. Thank you !
>  
> public String convertPDFtoJPG(String source , String filepath1, String 
> filePath2, IqiArInvoiceEventSourceVO arInvoiceEventSourceVO ) throws 
> BaseECapException{
>  
>  String newFile="";
>  
>  //IPM-5181
>  String filePathDelimiter = ";";
>  ArrayList filepaths = new ArrayList();
>  
>  {color:#FF}_try{_{color}
> {color:#FF} _PDDocument doc=PDDocument.load(new 
> FileInputStream(source));_{color}
> {color:#FF} _List 
> pages=doc.getDocumentCatalog().getAllPages();_{color}
> {color:#FF} _Iterator i= pages.iterator();_{color}
>  
> {color:#FF} _int count=1;_{color}
> {color:#FF} _while(i.hasNext()){_{color}
> {color:#FF} _PDPage page=i.next();_ {color}
> {color:#FF} _BufferedImage bi=page.convertToImage();_{color}
>  String saveFilePath = filepath1+filePath2;
>  
>  if (!new File(saveFilePath).exists()) {
>  new File(saveFilePath).mkdirs();
>  }
>  
> Thanks,
> Avinash



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

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



[jira] [Commented] (PDFBOX-4106) Vertical text creation

2018-02-14 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr commented on PDFBOX-4106:
-

Great... I'll start to commit tomorrow, if time permits.

> Vertical text creation
> --
>
> Key: PDFBOX-4106
> URL: https://issues.apache.org/jira/browse/PDFBOX-4106
> Project: PDFBox
>  Issue Type: New Feature
>  Components: FontBox, Parsing, Writing
>Reporter: Aaron Madlon-Kay
>Priority: Major
>  Labels: embed, gsub, parsing, vertical
> Attachments: 
> 0001-Add-OpenTypeScript-class-to-get-OT-script-tags-for-c.patch, 
> 0002-Optimize-Unicode-script-storage-and-lookup.patch, 
> 0003-Parse-GSUB-table.patch, 
> 0004-Abstract-cmap-lookup-into-an-interface.patch, 
> 0005-Implement-GSUB-substitution-on-TrueTypeFont.patch, 
> 0006-Use-vhea-vmtx-to-fix-vertical-displacements-in-PCIDF.patch, 
> 0007-Add-factory-methods-for-loading-TTF-as-vertical-font.patch, 
> 0008-Implement-vertical-metrics-support-when-embedding-subsetting.patch, 
> sample_code.txt, vertical.pdf
>
>
> I needed to output vertical Japanese text, but was stymied by several 
> limitations:
> * No API to load a TTF as Identity-V encoding
> * No support for 'vert' glyph substitution
> * No support for vertical metrics ('vhea' and 'vmtx' tables are parsed but 
> not used at all)
> I have attached a series of patches that implement the above features. 
> Highlights:
> * The GSUB glyph substitution table is parsed (limitation: type 1 lookups 
> only; this is sufficient for many features including 'vert'/'vrt2' vertical 
> glyph substitution)
> * Cmap lookup makes use of GSUB when features are enabled on a TTF
> * 'vhea' and 'vmtx' metrics are applied to PDCIDFont when appropriate, and 
> are embedded/subsetted correctly through the DW2/W2 CIDFont dictionary
> * An API has been added for loading a TTF as a vertical font, setting 
> Identity-V encoding and enabling 'vert'/'vrt2' substitution
> Each patch could approximately be split out into a separate ticket, if 
> desired.
> Also attached is some sample code that exercises these patches and 
> illustrates the effect of vertical glyph positioning. The sample output PDF 
> is also attached.



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

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