Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:mgoppold:printing
ghostscript
pdfwrite-PDFA-permit_non-XMP_entries_in_Docinfo...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pdfwrite-PDFA-permit_non-XMP_entries_in_Docinfo_to_contain_escapes_BUG704198.diff of Package ghostscript
X-Git-Url: http://git.ghostscript.com/?p=ghostpdl.git;a=blobdiff_plain;f=devices%2Fvector%2Fgdevpdfm.c;h=902c17ac69837f9a81ed949a75ec706566b19d37;hp=3746a13719a062d10b585a64f29ce45b6849f303;hb=0da9a4427923065368ccd66954bd56d573e9a3e8;hpb=8d08d2055efe6432f59e8ea005154f27e0099a8b diff --git a/devices/vector/gdevpdfm.c b/devices/vector/gdevpdfm.c index 3746a1371..902c17ac6 100644 --- a/devices/vector/gdevpdfm.c +++ b/devices/vector/gdevpdfm.c @@ -1933,6 +1933,31 @@ pdfmark_PAGELABEL(gx_device_pdf * pdev, gs_param_string * pairs, uint count, return 0; } +static int is_XMP_Key(gs_param_string *param) +{ + if (pdf_key_eq(param, "/Title")) + return 1; + if (pdf_key_eq(param, "/Author")) + return 1; + if (pdf_key_eq(param, "/Subject")) + return 1; + if (pdf_key_eq(param, "/Keywords")) + return 1; + if (pdf_key_eq(param, "/Creator")) + return 1; + if (pdf_key_eq(param, "/Producer")) + return 1; + /* These two aren't string data types and so won't affect anything + * in the DOCINFO pdfmark, which is the only client for this code currently + * but we may want to use this in future for other purposed. + */ + if (pdf_key_eq(param, "/CreationDate")) + return 1; + if (pdf_key_eq(param, "/ModDate")) + return 1; + return 0; +} + /* DOCINFO pdfmark */ static int pdfmark_DOCINFO(gx_device_pdf * pdev, gs_param_string * pairs, uint count, @@ -1956,7 +1981,7 @@ pdfmark_DOCINFO(gx_device_pdf * pdev, gs_param_string * pairs, uint count, continue; } - if (pdev->PDFA !=0) { + if (pdev->PDFA !=0 && is_XMP_Key(pair)) { const gs_param_string *p = pairs + i + 1; bool abort = false;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor