summaryrefslogtreecommitdiff
path: root/devices/vector
diff options
context:
space:
mode:
Diffstat (limited to 'devices/vector')
-rw-r--r--devices/vector/gdevpdfg.c11
-rw-r--r--devices/vector/gdevpdfx.h4
2 files changed, 11 insertions, 4 deletions
diff --git a/devices/vector/gdevpdfg.c b/devices/vector/gdevpdfg.c
index 3e2a2b6d5..73f78dd18 100644
--- a/devices/vector/gdevpdfg.c
+++ b/devices/vector/gdevpdfg.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2022 Artifex Software, Inc.
+/* Copyright (C) 2001-2023 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
@@ -224,7 +224,14 @@ pdf_viewer_state_from_gs_gstate_aux(pdf_viewer_state *pvs, const gs_gstate *pgs)
pvs->text_knockout = pgs->text_knockout;
pvs->fill_overprint = false;
pvs->stroke_overprint = false;
- pvs->stroke_adjust = false;
+ /* The PDF Reference says that the default is 'false' but experiments show (bug #706407)
+ * that Acrobat defaults to true. Also Ghostscript, at low resolution at least, defaults
+ * to true as well. By setting the initial value to neither true nor false we can ensure
+ * that any input file which sets it, whether true or false, will cause it not to match
+ * the initial value, so we will write it out, thus preserving the value, no matter what
+ * the default.
+ */
+ pvs->stroke_adjust = -1;
pvs->line_params.half_width = 0.5;
pvs->line_params.start_cap = 0;
pvs->line_params.end_cap = 0;
diff --git a/devices/vector/gdevpdfx.h b/devices/vector/gdevpdfx.h
index b41c9648b..e2b7c98d5 100644
--- a/devices/vector/gdevpdfx.h
+++ b/devices/vector/gdevpdfx.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2022 Artifex Software, Inc.
+/* Copyright (C) 2001-2023 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
@@ -503,7 +503,7 @@ typedef struct pdf_viewer_state_s {
bool text_knockout; /* state.text_knockout */
bool fill_overprint;
bool stroke_overprint;
- bool stroke_adjust; /* state.stroke_adjust */
+ int stroke_adjust; /* state.stroke_adjust */
bool fill_used_process_color;
bool stroke_used_process_color;
gx_hl_saved_color saved_fill_color;