[gs-commits] ghostpdl branch, pdfi, updated. jbig2dec-0.14-2199-g06a27e5
[email protected] (Nancy Durgin)
| Newsgroups | gmane.comp.printing.ghostscript.cvs |
|---|---|
| Message-ID | <[email protected]> |
The ghostpdl branch, pdfi has been updated
via 06a27e555f49aa29b1707376aa00b25c47535dc4 (commit)
via 65b7544c155734f80db9ed7eddcf2b424d523e83 (commit)
via 5b090ef60c45621d759d5bce29fc16c67856f712 (commit)
via 8e1100d50c90f3bd8db567b64a350bab0e548205 (commit)
from 6a482bd7d905c7ffce923daa9146e935cdb8137d (commit)
----------------------------------------------------------------------
commit 06a27e555f49aa29b1707376aa00b25c47535dc4
Author: Nancy Durgin <[email protected]>
Date: Tue Sep 3 15:53:57 2019 -0700
Implement blend mode, overprint stuff for transparency code
Still need to figure out how to determine what colorspaces are okay for
Overprint (pdfi_trans_okOPcs()).
diff --git a/pdf/pdf_trans.c b/pdf/pdf_trans.c
index 9c3dc4c..5bf4958 100644
--- a/pdf/pdf_trans.c
+++ b/pdf/pdf_trans.c
@@ -432,35 +432,77 @@ void pdfi_trans_set_needs_OP(pdf_context *ctx)
"NEEDS" : "does NOT NEED");
}
+/* Figures out if current colorspace is okay for Overprint */
+static bool pdfi_trans_okOPcs(pdf_context *ctx)
+{
+ /* TODO: Need to figure out insane pdf colorspace stuff */
+ /* See pdf_ops.ps/okOPcs , /setupOPtrans */
+ return true;
+}
+
int pdfi_trans_setup(pdf_context *ctx, pdfi_trans_state_t *state,
pdfi_transparency_caller_t caller, double alpha)
{
pdfi_int_gstate *igs = (pdfi_int_gstate *)ctx->pgs->client_data;
int code;
bool stroked_bbox;
+ bool current_overprint;
+ bool okOPcs = false;
+ bool ChangeBM = false;
+ gs_blend_mode_t mode;
+ bool need_group = false;
memset(state, 0, sizeof(*state));
if (!ctx->page_has_transparency)
return 0;
+ if (ctx->page_needs_OP) {
+ okOPcs = pdfi_trans_okOPcs(ctx);
+ if (okOPcs) {
+ if (caller == TRANSPARENCY_Caller_Stroke)
+ current_overprint = gs_currentstrokeoverprint(ctx->pgs);
+ else
+ current_overprint = gs_currentfilloverprint(ctx->pgs);
+ ChangeBM = current_overprint;
+ mode = gs_currentblendmode(ctx->pgs);
+ if (mode != BLEND_MODE_Normal && mode != BLEND_MODE_Compatible)
+ need_group = ChangeBM;
+ else
+ need_group = false;
+ } else {
+ need_group = false;
+ }
+ } else {
+ if (caller == TRANSPARENCY_Caller_Image || igs->SMask == NULL)
+ need_group = false;
+ else
+ need_group = true;
+ }
+
+
code = pdfi_trans_set_params(ctx, alpha);
if (code != 0)
return 0;
- if (igs->SMask == NULL || caller == TRANSPARENCY_Caller_Image) {
- state->GroupPushed = false;
+ if (!need_group && !ChangeBM)
return 0;
- }
/* TODO: error handling... */
- stroked_bbox = (caller == TRANSPARENCY_Caller_Stroke);
- code = pdfi_trans_begin_group(ctx, stroked_bbox, true, false);
- state->GroupPushed = true;
- state->saveOA = gs_currentopacityalpha(ctx->pgs);
- state->saveSA = gs_currentshapealpha(ctx->pgs);
- code = gs_setopacityalpha(ctx->pgs, 1.0);
- code = gs_setshapealpha(ctx->pgs, 1.0);
+ if (need_group) {
+ stroked_bbox = (caller == TRANSPARENCY_Caller_Stroke);
+ code = pdfi_trans_begin_group(ctx, stroked_bbox, true, false);
+ state->GroupPushed = true;
+ state->saveOA = gs_currentopacityalpha(ctx->pgs);
+ state->saveSA = gs_currentshapealpha(ctx->pgs);
+ code = gs_setopacityalpha(ctx->pgs, 1.0);
+ code = gs_setshapealpha(ctx->pgs, 1.0);
+ }
+ if (ChangeBM) {
+ state->saveBM = mode;
+ state->ChangeBM = true;
+ code = gs_setblendmode(ctx->pgs, BLEND_MODE_CompatibleOverprint);
+ }
return code;
}
@@ -477,13 +519,8 @@ int pdfi_trans_teardown(pdf_context *ctx, pdfi_trans_state_t *state)
code = gs_setshapealpha(ctx->pgs, state->saveSA);
}
- /* TODO:
- % Also, if we changed the BM, restore it (AFTER the group was popped)
- .currentblendmode /CompatibleOverprint eq {
- % restore the blendmode
- saveBM .setblendmode
- } if
- */
+ if (gs_currentblendmode(ctx->pgs) == BLEND_MODE_CompatibleOverprint)
+ code = gs_setblendmode(ctx->pgs, state->saveBM);
return code;
}
----------------------------------------------------------------------
commit 65b7544c155734f80db9ed7eddcf2b424d523e83
Author: Nancy Durgin <[email protected]>
Date: Wed Sep 4 12:41:41 2019 -0700
Moved some misc functions from pdf_int to pdf_misc
Cleaned up some compiler warnings.
diff --git a/pdf/ghostpdf.c b/pdf/ghostpdf.c
index e68b73e..cec8ca4 100644
--- a/pdf/ghostpdf.c
+++ b/pdf/ghostpdf.c
@@ -20,6 +20,7 @@
#include "pdf_dict.h"
#include "pdf_array.h"
#include "pdf_int.h"
+#include "pdf_misc.h"
#include "pdf_stack.h"
#include "pdf_file.h"
#include "pdf_loop_detect.h"
diff --git a/pdf/pdf_colour.c b/pdf/pdf_colour.c
index 1aeb2d1..04381f8 100644
--- a/pdf/pdf_colour.c
+++ b/pdf/pdf_colour.c
@@ -20,6 +20,7 @@
#include "pdf_pattern.h"
#include "pdf_stack.h"
#include "pdf_array.h"
+#include "pdf_misc.h"
#include "gsicc_manage.h"
#include "gsicc_profilecache.h"
#include "gsicc_create.h"
diff --git a/pdf/pdf_dict.c b/pdf/pdf_dict.c
index ade1afa..9985d0e 100644
--- a/pdf/pdf_dict.c
+++ b/pdf/pdf_dict.c
@@ -21,6 +21,7 @@
#include "pdf_array.h"
#include "pdf_int.h"
#include "pdf_loop_detect.h"
+#include "pdf_misc.h"
void pdfi_free_dict(pdf_obj *o)
{
diff --git a/pdf/pdf_file.c b/pdf/pdf_file.c
index f6dc18b..231687e 100644
--- a/pdf/pdf_file.c
+++ b/pdf/pdf_file.c
@@ -20,6 +20,7 @@
#include "pdf_file.h"
#include "pdf_int.h"
#include "pdf_array.h"
+#include "pdf_misc.h"
#include "stream.h"
#include "strimpl.h"
#include "strmio.h"
diff --git a/pdf/pdf_font.c b/pdf/pdf_font.c
index efcf0cc..b98d9be 100644
--- a/pdf/pdf_font.c
+++ b/pdf/pdf_font.c
@@ -21,6 +21,7 @@
#include "pdf_array.h"
#include "pdf_font.h"
#include "pdf_stack.h"
+#include "pdf_misc.h"
#include "pdf_font_types.h"
#include "pdf_font0.h"
#include "pdf_font1.h"
diff --git a/pdf/pdf_gstate.c b/pdf/pdf_gstate.c
index 2a36784..74f3d0e 100644
--- a/pdf/pdf_gstate.c
+++ b/pdf/pdf_gstate.c
@@ -22,6 +22,7 @@
#include "pdf_array.h"
#include "pdf_func.h"
#include "pdf_file.h"
+#include "pdf_misc.h"
#include "pdf_loop_detect.h"
#include "pdf_image.h"
#include "pdf_pattern.h"
@@ -826,11 +827,11 @@ static int GS_UCR2(pdf_context *ctx, pdf_dict *GS, pdf_dict *stream_dict, pdf_di
return code;
}
-typedef enum pdf_transfer_function_type_e {
+typedef enum {
E_IDENTITY,
E_DEFAULT,
E_FUNCTION
-};
+} pdf_transfer_function_type_e;
/* We use this for both TR and TR2, is_TR is true if this is a TR, in which case we don't want
* to permit /Default names for fucntions.
@@ -1030,9 +1031,8 @@ static int GS_TR(pdf_context *ctx, pdf_dict *GS, pdf_dict *stream_dict, pdf_dict
static int GS_TR2(pdf_context *ctx, pdf_dict *GS, pdf_dict *stream_dict, pdf_dict *page_dict)
{
- int code, i, j;
+ int code;
pdf_obj *obj = NULL;
- gs_offset_t saved_stream_offset;
code = pdfi_dict_get(ctx, GS, "TR2", &obj);
if (code < 0)
return code;
diff --git a/pdf/pdf_image.c b/pdf/pdf_image.c
index 41b3e1d..844bfb1 100644
--- a/pdf/pdf_image.c
+++ b/pdf/pdf_image.c
@@ -26,6 +26,7 @@
#include "pdf_loop_detect.h"
#include "pdf_colour.h"
#include "pdf_trans.h"
+#include "pdf_misc.h"
#include "stream.h" /* for stell() */
#include "gsiparm4.h"
diff --git a/pdf/pdf_int.c b/pdf/pdf_int.c
index 77344d0..1bc5123 100644
--- a/pdf/pdf_int.c
+++ b/pdf/pdf_int.c
@@ -21,6 +21,7 @@
#include "pdf_loop_detect.h"
#include "strmio.h"
#include "stream.h"
+#include "pdf_misc.h"
#include "pdf_path.h"
#include "pdf_colour.h"
#include "pdf_image.h"
@@ -247,35 +248,6 @@ void pdfi_free_object(pdf_obj *o)
}
/***********************************************************************************/
-/* Utility Functions */
-int
-pdfi_name_strcmp(const pdf_name *n, const char *s)
-{
- int len = strlen(s);
- if (n->length == len)
- return memcmp(n->data, s, len);
- return -1;
-}
-
-bool
-pdfi_name_is(const pdf_name *n, const char *s)
-{
- int len = strlen(s);
- if (n->length == len)
- return (memcmp(n->data, s, len) == 0);
- return false;
-}
-
-int
-pdfi_name_cmp(const pdf_name *n1, const pdf_name *n2)
-{
- if (n1->length != n2->length)
- return -1;
- return memcmp(n1->data, n2->data, n1->length);
-}
-
-
-/***********************************************************************************/
/* Functions to dereference object references and manage the object cache */
/* given an object, create a cache entry for it. If we have too many entries
diff --git a/pdf/pdf_int.h b/pdf/pdf_int.h
index d8e6c62..abe590e 100644
--- a/pdf/pdf_int.h
+++ b/pdf/pdf_int.h
@@ -59,11 +59,4 @@ int pdfi_interpret_content_stream(pdf_context *ctx, pdf_dict *stream_dict, pdf_d
int pdfi_find_resource(pdf_context *ctx, unsigned char *Type, pdf_name *name, pdf_dict *stream_dict, pdf_dict *page_dict, pdf_obj **o);
-
-/***********************************************************************************/
-/* Utility Functions */
-int pdfi_name_strcmp(const pdf_name *n, const char *s);
-bool pdfi_name_is(const pdf_name *n, const char *s);
-int pdfi_name_cmp(const pdf_name *n1, const pdf_name *n2);
-
#endif
diff --git a/pdf/pdf_misc.c b/pdf/pdf_misc.c
index 4b20187..02e8bdf 100644
--- a/pdf/pdf_misc.c
+++ b/pdf/pdf_misc.c
@@ -18,3 +18,54 @@
#include "pdf_int.h"
#include "pdf_stack.h"
#include "pdf_misc.h"
+#include "pdf_gstate.h"
+
+/* Get current bbox, possibly from stroking current path (utility function) */
+int pdfi_get_current_bbox(pdf_context *ctx, gs_rect *bbox, bool stroked)
+{
+ int code, code1;
+
+ if (stroked) {
+ code = pdfi_gsave(ctx);
+ if (code < 0)
+ return code;
+ code = gs_strokepath(ctx->pgs);
+ if (code < 0)
+ goto exit;
+ }
+ code = gs_upathbbox(ctx->pgs, bbox, false);
+
+ exit:
+ if (stroked) {
+ code1 = pdfi_grestore(ctx);
+ if (code == 0)
+ code = code1;
+ }
+ return code;
+}
+
+int
+pdfi_name_strcmp(const pdf_name *n, const char *s)
+{
+ int len = strlen(s);
+ if (n->length == len)
+ return memcmp(n->data, s, len);
+ return -1;
+}
+
+bool
+pdfi_name_is(const pdf_name *n, const char *s)
+{
+ int len = strlen(s);
+ if (n->length == len)
+ return (memcmp(n->data, s, len) == 0);
+ return false;
+}
+
+int
+pdfi_name_cmp(const pdf_name *n1, const pdf_name *n2)
+{
+ if (n1->length != n2->length)
+ return -1;
+ return memcmp(n1->data, n2->data, n1->length);
+}
diff --git a/pdf/pdf_misc.h b/pdf/pdf_misc.h
index 55e06c3..a10f6ed 100644
--- a/pdf/pdf_misc.h
+++ b/pdf/pdf_misc.h
@@ -16,5 +16,9 @@
#ifndef PDF_MISC
#define PDF_MISC
+int pdfi_get_current_bbox(pdf_context *ctx, gs_rect *bbox, bool stroked);
+int pdfi_name_strcmp(const pdf_name *n, const char *s);
+bool pdfi_name_is(const pdf_name *n, const char *s);
+int pdfi_name_cmp(const pdf_name *n1, const pdf_name *n2);
#endif
diff --git a/pdf/pdf_page.c b/pdf/pdf_page.c
index 7a96621..6596bff 100644
--- a/pdf/pdf_page.c
+++ b/pdf/pdf_page.c
@@ -24,6 +24,7 @@
#include "pdf_loop_detect.h"
#include "pdf_colour.h"
#include "pdf_trans.h"
+#include "pdf_misc.h"
#include "gsiparm4.h"
#include "gsiparm3.h"
diff --git a/pdf/pdf_trans.c b/pdf/pdf_trans.c
index eb193bf..9c3dc4c 100644
--- a/pdf/pdf_trans.c
+++ b/pdf/pdf_trans.c
@@ -24,6 +24,7 @@
#include "pdf_array.h"
#include "pdf_image.h"
#include "pdf_device.h"
+#include "pdf_misc.h"
#include "gstparam.h"
@@ -509,27 +510,3 @@ int pdfi_trans_set_params(pdf_context *ctx, double alpha)
return 0;
}
-
-/* Get current bbox, possibly from stroking current path (utility function) */
-int pdfi_get_current_bbox(pdf_context *ctx, gs_rect *bbox, bool stroked)
-{
- int code, code1;
-
- if (stroked) {
- code = pdfi_gsave(ctx);
- if (code < 0)
- return code;
- code = gs_strokepath(ctx->pgs);
- if (code < 0)
- goto exit;
- }
- code = gs_upathbbox(ctx->pgs, bbox, false);
-
- exit:
- if (stroked) {
- code1 = pdfi_grestore(ctx);
- if (code == 0)
- code = code1;
- }
- return code;
-}
diff --git a/pdf/pdf_trans.h b/pdf/pdf_trans.h
index ef4dff4..ced5cda 100644
--- a/pdf/pdf_trans.h
+++ b/pdf/pdf_trans.h
@@ -48,7 +48,4 @@ int pdfi_trans_end_isolated_group(pdf_context *ctx);
int pdfi_trans_end_smask_notify(pdf_context *ctx);
void pdfi_trans_set_needs_OP(pdf_context *ctx);
-/* Utility func that probably goes somewhere else */
-int pdfi_get_current_bbox(pdf_context *ctx, gs_rect *bbox, bool stroked);
-
#endif
----------------------------------------------------------------------
commit 5b090ef60c45621d759d5bce29fc16c67856f712
Author: Nancy Durgin <[email protected]>
Date: Tue Sep 3 13:50:48 2019 -0700
Add code to figure out whether page needs OverPrint or not
This is based on pdf_main.ps/pdfshowpage_finish
Add function for querying boolean device parameter
diff --git a/pdf/ghostpdf.c b/pdf/ghostpdf.c
index b9b8a89..e68b73e 100644
--- a/pdf/ghostpdf.c
+++ b/pdf/ghostpdf.c
@@ -1634,6 +1634,11 @@ static int pdfi_render_page(pdf_context *ctx, uint64_t page_num)
/* Force NOTRANSPARENCY here if required, until we can get it working... */
ctx->page_has_transparency = ctx->PageTransparencyArray[page_index] & page_bit ? 1 : 0;
+ /* Set whether device needs OP support
+ * This needs to be before transparency device is pushed, if applicable
+ */
+ pdfi_trans_set_needs_OP(ctx);
+
pdfi_gsave(ctx);
if (ctx->page_has_transparency) {
diff --git a/pdf/ghostpdf.h b/pdf/ghostpdf.h
index 64ec2b3..ff18550 100644
--- a/pdf/ghostpdf.h
+++ b/pdf/ghostpdf.h
@@ -280,6 +280,9 @@ typedef struct pdf_context_s
*/
char *PageTransparencyArray;
+ /* Does this page need overprint support? */
+ bool page_needs_OP;
+
double PageSize[4];
/* Page level PDF objects */
diff --git a/pdf/pdf_device.c b/pdf/pdf_device.c
index c07d331..8ac470b 100644
--- a/pdf/pdf_device.c
+++ b/pdf/pdf_device.c
@@ -18,3 +18,37 @@
#include "pdf_int.h"
#include "pdf_stack.h"
#include "pdf_device.h"
+
+static int pdfi_device_check_param(gx_device *dev, const char *param, gs_c_param_list *list)
+{
+ dev_param_req_t request;
+ int code;
+
+ gs_c_param_list_write(list, dev->memory);
+ /* Stuff the data into a structure for passing to the spec_op */
+ request.Param = (char *)param;
+ request.list = list;
+ code = dev_proc(dev, dev_spec_op)(dev, gxdso_get_dev_param, &request, sizeof(dev_param_req_t));
+ if (code < 0) {
+ gs_c_param_list_release(list);
+ return code;
+ }
+ return 0;
+}
+
+bool pdfi_device_check_param_bool(gx_device *dev, const char *param)
+{
+ int code;
+ gs_c_param_list list;
+ int value;
+
+ code = pdfi_device_check_param(dev, param, &list);
+ if (code < 0)
+ return false;
+ gs_c_param_list_read(&list);
+ code = param_read_bool((gs_param_list *)&list,
+ param,
+ &value);
+ gs_c_param_list_release(&list);
+ return value;
+}
diff --git a/pdf/pdf_device.h b/pdf/pdf_device.h
index edf4075..72187a3 100644
--- a/pdf/pdf_device.h
+++ b/pdf/pdf_device.h
@@ -16,4 +16,6 @@
#ifndef PDF_DEVICE
#define PDF_DEVICE
+bool pdfi_device_check_param_bool(gx_device *dev, const char *param);
+
#endif
diff --git a/pdf/pdf_trans.c b/pdf/pdf_trans.c
index f8974c9..eb193bf 100644
--- a/pdf/pdf_trans.c
+++ b/pdf/pdf_trans.c
@@ -23,6 +23,7 @@
#include "pdf_gstate.h"
#include "pdf_array.h"
#include "pdf_image.h"
+#include "pdf_device.h"
#include "gstparam.h"
@@ -406,6 +407,30 @@ int pdfi_trans_end_smask_notify(pdf_context *ctx)
return gs_begin_transparency_mask(ctx->pgs, ¶ms, &bbox, false);
}
+/* Setup whether or not we need to support overprint (for device)
+ * Check for:
+ * 1) whether or not it is a CMYK device, and
+ * 2) whether it is a device that has transparency support
+ * Based on pdf_main.ps/pdfshowpage_finish
+ */
+void pdfi_trans_set_needs_OP(pdf_context *ctx)
+{
+ bool is_cmyk;
+ bool have_transparency = false;
+
+ /* PS code checks for >= 4 components... */
+ is_cmyk = ctx->pgs->device->color_info.num_components >= 4;
+
+ have_transparency = pdfi_device_check_param_bool(ctx->pgs->device, "HaveTransparency");
+
+ if (!is_cmyk || have_transparency)
+ ctx->page_needs_OP = false;
+ else
+ ctx->page_needs_OP = true;
+ dbgmprintf1(ctx->memory, "Page %s Overprint\n", ctx->page_needs_OP ?
+ "NEEDS" : "does NOT NEED");
+}
+
int pdfi_trans_setup(pdf_context *ctx, pdfi_trans_state_t *state,
pdfi_transparency_caller_t caller, double alpha)
{
diff --git a/pdf/pdf_trans.h b/pdf/pdf_trans.h
index 2fcaa6e..ef4dff4 100644
--- a/pdf/pdf_trans.h
+++ b/pdf/pdf_trans.h
@@ -46,6 +46,7 @@ int pdfi_trans_set_params(pdf_context *ctx, double alpha);
int pdfi_trans_begin_isolated_group(pdf_context *ctx, bool image_with_SMask);
int pdfi_trans_end_isolated_group(pdf_context *ctx);
int pdfi_trans_end_smask_notify(pdf_context *ctx);
+void pdfi_trans_set_needs_OP(pdf_context *ctx);
/* Utility func that probably goes somewhere else */
int pdfi_get_current_bbox(pdf_context *ctx, gs_rect *bbox, bool stroked);
----------------------------------------------------------------------
commit 8e1100d50c90f3bd8db567b64a350bab0e548205
Author: Nancy Durgin <[email protected]>
Date: Wed Sep 4 09:15:23 2019 -0700
Add pdf_misc.c and pdf_device.c
No more procrastination!
Both empty for now.
diff --git a/pdf/pdf.mak b/pdf/pdf.mak
index 848cecb..d066027 100644
--- a/pdf/pdf.mak
+++ b/pdf/pdf.mak
@@ -122,6 +122,12 @@ $(PDFOBJ)pdf_file.$(OBJ): $(PDFSRC)pdf_file.c $(sjpeg_h) $(PDFINCLUDES) $(PDF_MA
$(PDFOBJ)pdf_trans.$(OBJ): $(PDFSRC)pdf_trans.c $(PDFINCLUDES) $(PDF_MAK) $(MAKEDIRS)
$(PDFCCC) $(PDFSRC)pdf_trans.c $(PDFO_)pdf_trans.$(OBJ)
+$(PDFOBJ)pdf_device.$(OBJ): $(PDFSRC)pdf_device.c $(PDFINCLUDES) $(PDF_MAK) $(MAKEDIRS)
+ $(PDFCCC) $(PDFSRC)pdf_device.c $(PDFO_)pdf_device.$(OBJ)
+
+$(PDFOBJ)pdf_misc.$(OBJ): $(PDFSRC)pdf_misc.c $(PDFINCLUDES) $(PDF_MAK) $(MAKEDIRS)
+ $(PDFCCC) $(PDFSRC)pdf_misc.c $(PDFO_)pdf_misc.$(OBJ)
+
$(PDFGEN)pdfimpl.c: $(PLSRC)plimpl.c $(PDF_MAK) $(MAKEDIRS)
$(CP_) $(PLSRC)plimpl.c $(PDFGEN)pdfimpl.c
@@ -166,6 +172,8 @@ PDF_OBJS=\
$(PDFOBJ)pdf_shading.$(OBJ)\
$(PDFOBJ)pdf_func.$(OBJ)\
$(PDFOBJ)pdf_trans.$(OBJ)\
+ $(PDFOBJ)pdf_device.$(OBJ)\
+ $(PDFOBJ)pdf_misc.$(OBJ)\
# NB - note this is a bit squirrely. Right now the pjl interpreter is
diff --git a/pdf/pdf_device.c b/pdf/pdf_device.c
new file mode 100644
index 0000000..c07d331
--- /dev/null
+++ b/pdf/pdf_device.c
@@ -0,0 +1,20 @@
+/* Copyright (C) 2001-2018 Artifex Software, Inc.
+ All Rights Reserved.
+
+ This software is provided AS-IS with no warranty, either express or
+ implied.
+
+ This software is distributed under license and may not be copied,
+ modified or distributed except as expressly authorized under the terms
+ of the license contained in the file LICENSE in this distribution.
+
+ Refer to licensing information at http://www.artifex.com or contact
+ Artifex Software, Inc., 1305 Grant Avenue - Suite 200, Novato,
+ CA 94945, U.S.A., +1(415)492-9861, for further information.
+*/
+
+/* Routines for dealing with devices */
+
+#include "pdf_int.h"
+#include "pdf_stack.h"
+#include "pdf_device.h"
diff --git a/pdf/pdf_device.h b/pdf/pdf_device.h
new file mode 100644
index 0000000..edf4075
--- /dev/null
+++ b/pdf/pdf_device.h
@@ -0,0 +1,19 @@
+/* Copyright (C) 2001-2018 Artifex Software, Inc.
+ All Rights Reserved.
+
+ This software is provided AS-IS with no warranty, either express or
+ implied.
+
+ This software is distributed under license and may not be copied,
+ modified or distributed except as expressly authorized under the terms
+ of the license contained in the file LICENSE in this distribution.
+
+ Refer to licensing information at http://www.artifex.com or contact
+ Artifex Software, Inc., 1305 Grant Avenue - Suite 200, Novato,
+ CA 94945, U.S.A., +1(415)492-9861, for further information.
+*/
+
+#ifndef PDF_DEVICE
+#define PDF_DEVICE
+
+#endif
diff --git a/pdf/pdf_misc.c b/pdf/pdf_misc.c
new file mode 100644
index 0000000..4b20187
--- /dev/null
+++ b/pdf/pdf_misc.c
@@ -0,0 +1,20 @@
+/* Copyright (C) 2001-2018 Artifex Software, Inc.
+ All Rights Reserved.
+
+ This software is provided AS-IS with no warranty, either express or
+ implied.
+
+ This software is distributed under license and may not be copied,
+ modified or distributed except as expressly authorized under the terms
+ of the license contained in the file LICENSE in this distribution.
+
+ Refer to licensing information at http://www.artifex.com or contact
+ Artifex Software, Inc., 1305 Grant Avenue - Suite 200, Novato,
+ CA 94945, U.S.A., +1(415)492-9861, for further information.
+*/
+
+/* Miscellaneous routines */
+
+#include "pdf_int.h"
+#include "pdf_stack.h"
+#include "pdf_misc.h"
diff --git a/pdf/pdf_misc.h b/pdf/pdf_misc.h
new file mode 100644
index 0000000..55e06c3
--- /dev/null
+++ b/pdf/pdf_misc.h
@@ -0,0 +1,20 @@
+/* Copyright (C) 2001-2018 Artifex Software, Inc.
+ All Rights Reserved.
+
+ This software is provided AS-IS with no warranty, either express or
+ implied.
+
+ This software is distributed under license and may not be copied,
+ modified or distributed except as expressly authorized under the terms
+ of the license contained in the file LICENSE in this distribution.
+
+ Refer to licensing information at http://www.artifex.com or contact
+ Artifex Software, Inc., 1305 Grant Avenue - Suite 200, Novato,
+ CA 94945, U.S.A., +1(415)492-9861, for further information.
+*/
+
+#ifndef PDF_MISC
+#define PDF_MISC
+
+
+#endif
Summary of changes:
pdf/ghostpdf.c | 6 ++
pdf/ghostpdf.h | 3 +
pdf/pdf.mak | 8 +++
pdf/pdf_colour.c | 1 +
pdf/pdf_device.c | 54 +++++++++++++++++
pdf/{pdf_xref.h => pdf_device.h} | 7 +--
pdf/pdf_dict.c | 1 +
pdf/pdf_file.c | 1 +
pdf/pdf_font.c | 1 +
pdf/pdf_gstate.c | 8 +--
pdf/pdf_image.c | 1 +
pdf/pdf_int.c | 30 +---------
pdf/pdf_int.h | 7 ---
pdf/pdf_misc.c | 71 +++++++++++++++++++++++
pdf/{pdf_font1C.h => pdf_misc.h} | 11 ++--
pdf/pdf_page.c | 1 +
pdf/pdf_trans.c | 121 ++++++++++++++++++++++++++-------------
pdf/pdf_trans.h | 4 +-
18 files changed, 243 insertions(+), 93 deletions(-)
create mode 100644 pdf/pdf_device.c
copy pdf/{pdf_xref.h => pdf_device.h} (84%)
create mode 100644 pdf/pdf_misc.c
copy pdf/{pdf_font1C.h => pdf_misc.h} (68%)