summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc
diff options
context:
space:
mode:
authorHan The Thanh <hanthethanh@gmail.com>2010-04-16 10:39:02 +0000
committerHan The Thanh <hanthethanh@gmail.com>2010-04-16 10:39:02 +0000
commit1a4eb7d7de2042c12e223a2eb31bc016de246561 (patch)
treede1e1b8f9a605b6528712675291c752a3f75f3ed /Build/source/texk/web2c/pdftexdir/pdftoepdf.cc
parent3ba06bc5a98bfc651ab7ec896205727f7373045d (diff)
minor fixes for pdftex
git-svn-id: svn://tug.org/texlive/trunk@17892 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/pdftexdir/pdftoepdf.cc')
-rw-r--r--Build/source/texk/web2c/pdftexdir/pdftoepdf.cc15
1 files changed, 12 insertions, 3 deletions
diff --git a/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc b/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc
index d1da80bb3cc..fd1b5365cb5 100644
--- a/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc
+++ b/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc
@@ -447,13 +447,22 @@ static void copyFontResources(Object * obj)
static void copyOtherResources(Object * obj, char *key)
{
// copies all other resources (write_epdf handles Fonts and ProcSets),
- // but gives a warning if an object is not a dictionary.
- if (!obj->isDict())
+ // if Subtype is present, it must be a name
+ if (strcmp("Subtype", key) == 0) {
+ if (!obj->isName()) {
+ pdftex_warn("PDF inclusion: Subtype in Resources dict is not a name"
+ " (key '%s', type <%s>); ignored.",
+ key, obj->getTypeName());
+ return;
+ }
+ } else if (!obj->isDict()) {
//FIXME: Write the message only to the log file
pdftex_warn("PDF inclusion: invalid other resource which is no dict"
- " (key '%s', type <%s>); copying it anyway.",
+ " (key '%s', type <%s>); ignored.",
key, obj->getTypeName());
+ return;
+ }
copyName(key);
pdf_puts(" ");
copyObject(obj);