summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlgs/Resource/Init/pdf_base.ps
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/tlgs/Resource/Init/pdf_base.ps')
-rw-r--r--Master/tlpkg/tlgs/Resource/Init/pdf_base.ps27
1 files changed, 16 insertions, 11 deletions
diff --git a/Master/tlpkg/tlgs/Resource/Init/pdf_base.ps b/Master/tlpkg/tlgs/Resource/Init/pdf_base.ps
index bdfe9ee8feb..f2ae2dec3ef 100644
--- a/Master/tlpkg/tlgs/Resource/Init/pdf_base.ps
+++ b/Master/tlpkg/tlgs/Resource/Init/pdf_base.ps
@@ -774,6 +774,11 @@ currentdict /no_debug_dict undef
% When resolving an object reference, we stop at the endobj or endstream.
/resolveopdict mark
valueopdict { } forall
+ /xref { % Bug 697761
+ ( **** Error: Encountered 'xref' while expecting 'endobj'.\n) pdfformaterror
+ ( Treating this as a missing 'endobj', output may be incorrect.\n) pdfformaterror
+ endobj exit
+ } bind
/endstream { endobj exit } bind
/endobj { endobj exit } bind
/endjobj { % Bug 689876.
@@ -786,9 +791,13 @@ currentdict /no_debug_dict undef
( Output may be incorrect.\n) pdfformaterror
endobj exit
} bind
+ /obj {
% OmniForm generates PDF file with endobj missing in some
% objects. AR ignores this. So we have to do it too.
- /obj { pop pop endobj exit } bind
+ ( **** Error: Encountered 'obj' while expecting 'endobj'.\n) pdfformaterror
+ ( Treating this as a missing 'endobj', output may be incorrect.\n) pdfformaterror
+ pop pop endobj exit
+ } bind
.dicttomark readonly def
/resolveR { % <object#> <generation#> resolveR <object>
@@ -849,12 +858,13 @@ currentdict /no_debug_dict undef
dup type /dicttype eq % For dictionaries only
{
- dup /Type .knownget % make sure the dictionary has a type
+ dup /Type known % make sure the dictionary has a type
{
- dup /Font eq exch /FontDescriptor eq or % and ensure its a Font or FontDescriptor
- {dup 3 -1 roll /.gs.pdfobj# exch put}
- {exch pop}
- ifelse
+ %% We must not add to *all* dictionaries, because some of them are handled by
+ %% executing all the key/value pairs, and adding a integer causes problems
+ %% Since we only use this number for font identification, or checking self-references,
+ %% we only need it for dictionaries with a Type, and these are always handled more carefully.
+ dup 3 -1 roll /.gs.pdfobj# exch put
}
{exch pop}
ifelse
@@ -889,11 +899,6 @@ currentdict /no_debug_dict undef
% may have preceded the EOL, such as spaces or tabs. Thus we back up one
% character and scan until we find the \n terminator.
/stream { % <dict> stream <modified_dict>
- dup /Length knownoget {
- 0 eq {
- dup /Filter undef % don't confuse any filters that require data
- } if
- } if
dup /F known dup PDFsource PDFfile eq or {
not {
dup /File PDFfile put