Hello,
i build a parser for pdf color conversion. All works fine but now i build a
test file with adobe indesign CS4 where i use spotcolor and rgb colors.
The structure of this pdf for the content based on different stream objects. I
parse this streams but here i get some errors:
the stream copy out of rups:
1 Tf
12 0 0 12 36 596.6917 Tm
[(\025\027)41(\006\024)20(\021)9(\026\024\020\033\031)20(\024\033\021)9(\026\024)20(\026\024\033\003)-2(\t\034)20(\026\024\033\036\024)20(\021\033\016\035\034\023\026\017\r\033\031)20(\034\023\033\032\017)-14(\013\002\026\033\001\017\026\036\021)9(\026\033\030)30(\026\017\026\031\027\026\024\033\b)-3()27(\024)]TJ
ET
EMC
/Span <</MCID 5 >>BDC
BT
/T1_0 1 Tf
12 0 0 12 529.2922 596.6917 Tm
(\004)Tj
ET
EMC
/Span <</MCID 6 >>BDC
BT
/T1_0 1 Tf
12 0 0 12 36 582.2917 Tm
[(\024)20(\026\024\201\033\005)18(\023\033\026\031)20(\024\033\027\017\031\215\031\022\f\026\025\033\217)16(\026\031\025)20(\220)14(\031)20(\026\f\033\r\036\033\024)20(\026\034\023\026\024\020\033\n\026\017\033\215)5(\013)27(\024\033\036\024\025\033\036\024\027\026\017\r\031)20(\026\034\027\033\025)20(\031)14(\035\034\033\235\026\033)]TJ
ET
EMC
/Span <</MCID 7 >>BDC
BT
/T1_0 1 Tf
12 0 0 12 36 567.8917 Tm
[(\022\024\025\027\017\026\024)14(\032\026\024)20(\021)9(\026\017\033\b)-3()27(\017\220)14(\026\017\f\031)14(\035\034)20(\026\017\033\217)16(\026\027)41(\006)64(\027\031)14(\032\036\024)14(\032\020\033\022\036\002\026\017\033\036)15(\023\033\240)6(\013)27(\017)46(\027\026\031)20(\f\026\033\021)9(\022\017)-5(\022\036\025\033\r\036\033)]
I use an example to parse the content with
byte[] contentBytes = PdfReader.getStreamBytes(stream);
PRTokeniser tokeniser = new PRTokeniser(contentBytes);
PdfContentParser ps = new PdfContentParser(tokeniser);
ArrayList<PdfObject> operands = new ArrayList<PdfObject>();
while (ps.parse(operands).size() > 0)
{
try
{
final PdfObject op = operands.get(operands.size() - 1);
if (op instanceof PdfLiteral)
{
final PdfLiteral operator = (PdfLiteral)
operands.get(operands.size() - 1);
processOperator(this, operator, operands);
}
...
this part is not a PdfLiteral it is a PdfArray
[(\025\027)41(\006\024)20(\021)9(\026\024\020\033\031)20(\024\033\021)9(\026\024)20(\026\024\033\003)-2(\t\034)20(\026\024\033\036\024)20(\021\033\016\035\034\023\026\017\r\033\031)20(\034\023\033\032\017)-14(\013\002\026\033\001\017\026\036\021)9(\026\033\030)30(\026\017\026\031\027\026\024\033\b)-3()27(\024)]
Question: I think i only must write this array to the output stream without
modification, but i don't know how, is there a example?
with regards
Thomas Kübler
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php