[gs-commits] ghostpdl branch, pdfi, updated. jbig2dec-0.14-2623-g34e65c4
[email protected] (Nancy Durgin) Wed, 27 Nov 2019 22:02:33 +0000 (UTC)
| Newsgroups | gmane.comp.printing.ghostscript.cvs |
|---|---|
| Message-ID | <[email protected]> |
The ghostpdl branch, pdfi has been updated
via 34e65c4231a054195b23b6b60517ad7ebe20cbda (commit)
from 6a2c04019be27f199ba107fba125bf04bf8dd1c6 (commit)
----------------------------------------------------------------------
commit 34e65c4231a054195b23b6b60517ad7ebe20cbda
Author: Nancy Durgin <[email protected]>
Date: Wed Nov 27 13:10:11 2019 -0800
Change some default values in the context, particularly 'printed'
The context gets initialized to 0, but some of the flags should actually
default to 'true'. This fixes the ones I know about.
Note that for 'printed', it should actually default to 'true' if
OutputFile is set, and 'false' if it's not. But this means it is
'true' basically almost all the time, so I just set it to 'true' for
now until I can figure out how to test OutputFile at that point in the
flow.
This means some annotations won't render unless '-dPrinted=false' is specified
on the command line, but it should match the behavior of gs in these cases.
diff --git a/pdf/ghostpdf.c b/pdf/ghostpdf.c
index c610fbf..89c7f30 100644
--- a/pdf/ghostpdf.c
+++ b/pdf/ghostpdf.c
@@ -866,6 +866,12 @@ pdf_context *pdfi_create_context(gs_memory_t *pmem)
ctx->main_stream = NULL;
+ /* Setup some flags that don't default to 'false' */
+ ctx->showannots = true;
+ ctx->preserveannots = true;
+ /* NOTE: For testing certain annotations on cluster, might want to set this to false */
+ ctx->printed = true; /* TODO: Should be true if OutputFile is set, false otherwise */
+
/* Gray, RGB and CMYK profiles set when color spaces installed in graphics lib */
ctx->gray_lin = gs_cspace_new_ICC(ctx->memory, ctx->pgs, -1);
ctx->gray = gs_cspace_new_ICC(ctx->memory, ctx->pgs, 1);
diff --git a/pdf/pdftop.c b/pdf/pdftop.c
index ad0ab23..ea4f029 100644
--- a/pdf/pdftop.c
+++ b/pdf/pdftop.c
@@ -408,7 +408,6 @@ pdf_impl_set_param(pl_interp_implementation_t *impl,
ctx->showacroform = boolval;
return 0;
}
- ctx->showannots = true;;
if (!strncmp(param, "ShowAnnots", 10)) {
ctx->showannots = boolval;
return 0;
Summary of changes:
pdf/ghostpdf.c | 6 ++++++
pdf/pdftop.c | 1 -
2 files changed, 6 insertions(+), 1 deletion(-)