summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2016-08-23 21:44:55 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2016-08-23 21:44:55 +0000
commite79cc27121ee6391bedc8b1fbe22fa37f56f4c25 (patch)
tree478b6eab1c378a6ed86daf1984621162ca682270 /Build/source
parentdbaf5dc8b5ab0af4d93ec0d70ca70f72ab0d76ca (diff)
luatexdir: sync with the upstream
git-svn-id: svn://tug.org/texlive/trunk@41915 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdfgen.w9
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/extensions.w1
2 files changed, 7 insertions, 3 deletions
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w b/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w
index bb3d47af670..2b081e21e03 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w
@@ -284,9 +284,13 @@ void fix_pdf_minorversion(PDF pdf)
/* Check that variables for \.{PDF} output are unchanged */
if (pdf->minor_version != pdf_minor_version)
normal_error("pdf backend", "minorversion cannot be changed after data is written to the PDF file");
- if (pdf->draftmode != draft_mode_par)
- normal_error("pdf backend", "draftmode cannot be changed after data is written to the PDF file");
}
+}
+
+static void fix_pdf_draftmode(PDF pdf)
+{
+ if (pdf->draftmode != draft_mode_par)
+ normal_error("pdf backend", "draftmode cannot be changed after data is written to the PDF file");
if (pdf->draftmode != 0) {
pdf->compress_level = 0; /* re-fix it, might have been changed inbetween */
pdf->objcompresslevel = 0;
@@ -1025,6 +1029,7 @@ static void ensure_pdf_header_written(PDF pdf)
/* Initialize variables for \.{PDF} output */
fix_pdf_minorversion(pdf);
init_pdf_outputparameters(pdf);
+ fix_pdf_draftmode(pdf);
/* Write \.{PDF} header */
pdf_printf(pdf, "%%PDF-1.%d\n", pdf->minor_version);
/* The next blob will be removed 1.0. */
diff --git a/Build/source/texk/web2c/luatexdir/tex/extensions.w b/Build/source/texk/web2c/luatexdir/tex/extensions.w
index feff6e38277..838c6edcead 100644
--- a/Build/source/texk/web2c/luatexdir/tex/extensions.w
+++ b/Build/source/texk/web2c/luatexdir/tex/extensions.w
@@ -294,7 +294,6 @@ static void do_resource_pdf(int immediate, int code)
}
break;
case save_image_resource_code:
- fix_pdf_minorversion(static_pdf);
scan_pdfximage(static_pdf);
if (immediate) {
pdf_write_image(static_pdf, last_saved_image_index);