diff options
author | Han The Thanh <hanthethanh@gmail.com> | 2008-07-03 16:11:52 +0000 |
---|---|---|
committer | Han The Thanh <hanthethanh@gmail.com> | 2008-07-03 16:11:52 +0000 |
commit | c2c5c262b00a301d7731c9422843454457fb4429 (patch) | |
tree | b7718cf68b709954f17758871b7580fa07891ecb /Build/source/texk/web2c/pdftexdir/pdftoepdf.cc | |
parent | c51e576c58e88a1f340770fe162fb2c1ac98ff87 (diff) |
some bugfixes for pdftex:
- a bugfix for TrueType font handling
- a bugfix for pdf inclusion
git-svn-id: svn://tug.org/texlive/trunk@9192 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/pdftexdir/pdftoepdf.cc')
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/pdftoepdf.cc | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc b/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc index 35683d600c9..76ba973eb76 100644 --- a/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc +++ b/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc @@ -958,9 +958,37 @@ void write_epdf(void) // write the page contents page->getContents(&contents); if (contents->isStream()) { - initDictFromDict(obj1, contents->streamGetDict()); - contents->streamGetDict()->incRef(); - copyDict(&obj1); + + // Variant A: get stream and recompress under control + // of \pdfcompresslevel + // + // pdfbeginstream(); + // copyStream(contents->getStream()); + // pdfendstream(); + + // Variant B: copy stream without recompressing + // + contents->streamGetDict()->lookup("F", &obj1); + if (!obj1->isNull()) { + pdftex_fail("PDF inclusion: Unsupported external stream"); + } + contents->streamGetDict()->lookup("Length", &obj1); + assert(!obj1->isNull()); + pdf_puts("/Length "); + copyObject(&obj1); + pdf_puts("\n"); + contents->streamGetDict()->lookup("Filter", &obj1); + if (!obj1->isNull()) { + pdf_puts("/Filter "); + copyObject(&obj1); + pdf_puts("\n"); + contents->streamGetDict()->lookup("DecodeParms", &obj1); + if (!obj1->isNull()) { + pdf_puts("/DecodeParms "); + copyObject(&obj1); + pdf_puts("\n"); + } + } pdf_puts(">>\nstream\n"); copyStream(contents->getStream()->getUndecodedStream()); pdfendstream(); |