Skip to content
Snippets Groups Projects
Commit e3c867ff authored by Luigi Scarso's avatar Luigi Scarso
Browse files

fixed a bug in drafmode (HH)

parent 4eb8fc0b
No related branches found
No related tags found
No related merge requests found
...@@ -1879,7 +1879,6 @@ this: ...@@ -1879,7 +1879,6 @@ this:
\NC \type {set_attribute} \NC \yes \NC \yes \NC \NR \NC \type {set_attribute} \NC \yes \NC \yes \NC \NR
\NC \type {setboth} \NC \yes \NC \yes \NC \NR \NC \type {setboth} \NC \yes \NC \yes \NC \NR
\NC \type {setbox} \NC \nop \NC \yes \NC \NR \NC \type {setbox} \NC \nop \NC \yes \NC \NR
\NC \type {setbox} \NC \yes \NC \yes \NC \NR
\NC \type {setchar} \NC \yes \NC \yes \NC \NR \NC \type {setchar} \NC \yes \NC \yes \NC \NR
\NC \type {setdisc} \NC \yes \NC \yes \NC \NR \NC \type {setdisc} \NC \yes \NC \yes \NC \NR
\NC \type {setfield} \NC \yes \NC \yes \NC \NR \NC \type {setfield} \NC \yes \NC \yes \NC \NR
......
No preview for this file type
...@@ -284,9 +284,13 @@ void fix_pdf_minorversion(PDF pdf) ...@@ -284,9 +284,13 @@ void fix_pdf_minorversion(PDF pdf)
/* Check that variables for \.{PDF} output are unchanged */ /* Check that variables for \.{PDF} output are unchanged */
if (pdf->minor_version != pdf_minor_version) if (pdf->minor_version != pdf_minor_version)
normal_error("pdf backend", "minorversion cannot be changed after data is written to the PDF file"); 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) { if (pdf->draftmode != 0) {
pdf->compress_level = 0; /* re-fix it, might have been changed inbetween */ pdf->compress_level = 0; /* re-fix it, might have been changed inbetween */
pdf->objcompresslevel = 0; pdf->objcompresslevel = 0;
...@@ -1025,6 +1029,7 @@ static void ensure_pdf_header_written(PDF pdf) ...@@ -1025,6 +1029,7 @@ static void ensure_pdf_header_written(PDF pdf)
/* Initialize variables for \.{PDF} output */ /* Initialize variables for \.{PDF} output */
fix_pdf_minorversion(pdf); fix_pdf_minorversion(pdf);
init_pdf_outputparameters(pdf); init_pdf_outputparameters(pdf);
fix_pdf_draftmode(pdf);
/* Write \.{PDF} header */ /* Write \.{PDF} header */
pdf_printf(pdf, "%%PDF-1.%d\n", pdf->minor_version); pdf_printf(pdf, "%%PDF-1.%d\n", pdf->minor_version);
/* The next blob will be removed 1.0. */ /* The next blob will be removed 1.0. */
......
...@@ -294,7 +294,6 @@ static void do_resource_pdf(int immediate, int code) ...@@ -294,7 +294,6 @@ static void do_resource_pdf(int immediate, int code)
} }
break; break;
case save_image_resource_code: case save_image_resource_code:
fix_pdf_minorversion(static_pdf);
scan_pdfximage(static_pdf); scan_pdfximage(static_pdf);
if (immediate) { if (immediate) {
pdf_write_image(static_pdf, last_saved_image_index); pdf_write_image(static_pdf, last_saved_image_index);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment