[jira] [Comment Edited] (PDFBOX-2042) ColorSpace with empty Range array

2014-04-26 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr edited comment on PDFBOX-2042 at 4/26/14 9:52 PM:
--

Thanks for the feedback. Btw, PDLab has the same problem, see PDFBOX-2047.


was (Author: tilman):
Thanks for the feedback. Btw, PDLab has the same problem, I'll create an issue 
soon.

> ColorSpace with empty Range array
> -
>
> Key: PDFBOX-2042
> URL: https://issues.apache.org/jira/browse/PDFBOX-2042
> Project: PDFBox
>  Issue Type: Bug
>  Components: PDModel
>Affects Versions: 1.8.4, 1.8.5, 2.0.0
>Reporter: Juraj Lonc
>Assignee: Tilman Hausherr
> Fix For: 1.8.5, 2.0.0
>
> Attachments: ModifyTest.java, pdfbox18.pdf, pdfbox20.pdf
>
>
> I have PDF document where I am modifying PDPage content stream.
> Saved document is invalid (Adobe reader complains about it).
> I have narrowed it down to ColorSpace. 
> Original document has colorspace:
> /ColorSpace <<
> /Cs6 [/ICCBased <<
> /Alternate /DeviceRGB
> /Filter /FlateDecode
> /Length 2597
> /N 3
> >>]>>
> Modified document has colorspace:
> /ColorSpace <<
> /Cs6 [/ICCBased <<
> /Alternate /DeviceRGB
> /Filter /FlateDecode
> /Length 2597
> /N 3
> /Range []
> >>]>>
> When I manually remove "/Range []" from PDF then Adobe reader opens it 
> without an error.
> Obviously that range is added by calling PDICCBased.getRangeArray(0) 
> somewhere.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Comment Edited] (PDFBOX-2042) ColorSpace with empty Range array

2014-04-24 Thread Tilman Hausherr (JIRA)

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

Tilman Hausherr edited comment on PDFBOX-2042 at 4/24/14 6:37 PM:
--

Done in rev 1589827 for the trunk and rev 1589828 for the 1.8 branch. I dropped 
the idea of creating a correct size array (getNumberOfComponents() * 2) for a 
write, because the (deprecated) call setNumberOfComponents() allows dynamic 
change of the component count.

And [~chupacabras] gets a saved PDF that does not have an unneeded default 
range as in the previous fix.


was (Author: tilman):
Done in rev 1589827 for the trunk and rev 1589828 for the 1.8 branch. I dropped 
the idea of creating a correct size array (getNumberOfComponents() * 2) for a 
write, because the (deprecated) call setNumberOfComponents() allows dynamic 
change of the component count.

> ColorSpace with empty Range array
> -
>
> Key: PDFBOX-2042
> URL: https://issues.apache.org/jira/browse/PDFBOX-2042
> Project: PDFBox
>  Issue Type: Bug
>  Components: PDModel
>Affects Versions: 1.8.4, 1.8.5, 2.0.0
>Reporter: Juraj Lonc
>Assignee: Tilman Hausherr
> Fix For: 1.8.5, 2.0.0
>
> Attachments: ModifyTest.java, pdfbox18.pdf, pdfbox20.pdf
>
>
> I have PDF document where I am modifying PDPage content stream.
> Saved document is invalid (Adobe reader complains about it).
> I have narrowed it down to ColorSpace. 
> Original document has colorspace:
> /ColorSpace <<
> /Cs6 [/ICCBased <<
> /Alternate /DeviceRGB
> /Filter /FlateDecode
> /Length 2597
> /N 3
> >>]>>
> Modified document has colorspace:
> /ColorSpace <<
> /Cs6 [/ICCBased <<
> /Alternate /DeviceRGB
> /Filter /FlateDecode
> /Length 2597
> /N 3
> /Range []
> >>]>>
> When I manually remove "/Range []" from PDF then Adobe reader opens it 
> without an error.
> Obviously that range is added by calling PDICCBased.getRangeArray(0) 
> somewhere.



--
This message was sent by Atlassian JIRA
(v6.2#6252)