You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2015/07/22 21:31:05 UTC
[jira] [Commented] (PDFBOX-2900) PDF Debugger doesn't print inline
images correctly
[ https://issues.apache.org/jira/browse/PDFBOX-2900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14637485#comment-14637485 ]
Tilman Hausherr commented on PDFBOX-2900:
-----------------------------------------
This is somewhat related to PDFBOX-2772, to the code segment that the complaint there was about. This is a nasty trap (and I've falled into that one before too) - the BI operator [is not like the others|https://www.youtube.com/watch?v=FClGhto1vIg], it is more like a container.
{code}
else if( o instanceof Operator)
{
Operator op = (Operator)o;
if( op.getName().equals( "BI" ) )
{
output.write( "BI".getBytes(Charsets.ISO_8859_1) );
COSDictionary dic = op.getImageParameters();
for( COSName key : dic.keySet() )
{
Object value = dic.getDictionaryObject( key );
key.writePDF( output );
output.write( SPACE );
writeObject( value );
output.write( EOL );
}
output.write( "ID".getBytes(Charsets.ISO_8859_1) );
output.write( EOL );
output.write( op.getImageData() );
output.write( EOL );
output.write( "EI".getBytes(Charsets.ISO_8859_1) );
output.write( EOL );
}
else
{
output.write( op.getName().getBytes(Charsets.ISO_8859_1) );
output.write( EOL );
}
}
{code}
> PDF Debugger doesn't print inline images correctly
> --------------------------------------------------
>
> Key: PDFBOX-2900
> URL: https://issues.apache.org/jira/browse/PDFBOX-2900
> Project: PDFBox
> Issue Type: Sub-task
> Components: Swing GUI
> Affects Versions: 2.0.0
> Environment: 2.0.0-SNAPSHOT update 22/7/2015 rev 1692254
> Reporter: Andrea Vacondio
> Assignee: khyrul bashar
> Labels: debugger
> Attachments: inline_image_debugger.png
>
>
> The PDF debugger doesn't print correctly inline images in content stream, unfiltered view. It actually prints only the BI operator, no parameters, no image data. I'm attaching a screenshot where you can see the difference from the debugger and printing the the stream to sysout.
> Also, looking at the code, the panel prints the parsed tokens (I'm looking at StreamPane::getContentStreamDocument). I find it a little confusing because the combo box says "unfiltered" so I was expecting the raw, unfiltered stream data, not the result of the PDFBox stream parsing.
> Side note, it would be nice to be able to select and copy (ctrl-c) the content from the stream panel.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org