summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);