summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2013-04-30 13:21:50 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2013-04-30 13:21:50 +0000
commitef447158f844e9d9c2fb4e328cce5225e1f08fb9 (patch)
tree078ee5a14f27c241adecc0563617080fb5a6d562 /Build/source
parentd9138f40c346b88147148d28cf7e479013a51246 (diff)
Add a compatible mode with the old behavior per Karl, where image cache is ignored (default).
git-svn-id: svn://tug.org/texlive/trunk@30184 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r--Build/source/texk/dvipdfmx/ChangeLog6
-rw-r--r--Build/source/texk/dvipdfmx/data/dvipdfmx.cfg3
-rw-r--r--Build/source/texk/dvipdfmx/src/dpxfile.c10
-rw-r--r--Build/source/texk/dvipdfmx/src/dvipdfmx.c6
-rw-r--r--Build/source/texk/dvipdfmx/src/pdfximage.c18
-rw-r--r--Build/source/texk/xdvipdfmx/ChangeLog6
-rw-r--r--Build/source/texk/xdvipdfmx/data/dvipdfmx.cfg443
-rw-r--r--Build/source/texk/xdvipdfmx/src/dpxfile.c10
-rw-r--r--Build/source/texk/xdvipdfmx/src/dvipdfmx.c6
-rw-r--r--Build/source/texk/xdvipdfmx/src/pdfximage.c17
10 files changed, 276 insertions, 249 deletions
diff --git a/Build/source/texk/dvipdfmx/ChangeLog b/Build/source/texk/dvipdfmx/ChangeLog
index 6de02b17a65..8def2587005 100644
--- a/Build/source/texk/dvipdfmx/ChangeLog
+++ b/Build/source/texk/dvipdfmx/ChangeLog
@@ -1,3 +1,9 @@
+2013-04-30 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * src/dpxfile.c, src/pdfximage.c, src/dvipdfmx.c, data/dvipdfmx.cfg:
+ Add a compatible mode with the old behavior per Karl, where
+ image cache is ignored.
+
2013-04-30 Peter Breitenlohner <peb@mppmu.mpg.de>
* dvipdfmx.test: New shell script for a simple test.
diff --git a/Build/source/texk/dvipdfmx/data/dvipdfmx.cfg b/Build/source/texk/dvipdfmx/data/dvipdfmx.cfg
index 3aca31fd2ed..1832f5a9a85 100644
--- a/Build/source/texk/dvipdfmx/data/dvipdfmx.cfg
+++ b/Build/source/texk/dvipdfmx/data/dvipdfmx.cfg
@@ -193,7 +193,8 @@ D "rungs -q -dNOPAUSE -dBATCH -dEPSCrop -sDEVICE=pdfwrite -dCompatibilityLevel=
%% Image cache life in hours
%% 0 means erase all old images and leave new images
%% -1 means erase all old images and also erase new images
-%I -1
+%% -2 means ignore image cache
+%I -2
%% Font Map Files
%%
diff --git a/Build/source/texk/dvipdfmx/src/dpxfile.c b/Build/source/texk/dvipdfmx/src/dpxfile.c
index 7444632803a..8aa77d00d20 100644
--- a/Build/source/texk/dvipdfmx/src/dpxfile.c
+++ b/Build/source/texk/dvipdfmx/src/dpxfile.c
@@ -61,7 +61,7 @@
#endif
static int verbose = 0;
-int keep_cache = false;
+int keep_cache = 0;
void
dpx_file_set_verbose (void)
@@ -877,7 +877,11 @@ dpx_delete_old_cache (int life)
struct dirent *de;
time_t limit = time(NULL) - life * 60 * 60;
- if (life >= 0) keep_cache = true;
+ if (life == -2) {
+ keep_cache = -1;
+ return;
+ }
+ if (life >= 0) keep_cache = 1;
if ((dp = opendir(dir)) != NULL) {
while((de = readdir(dp)) != NULL) {
if (dpx_clear_cache_filter(de)) {
@@ -900,7 +904,7 @@ dpx_delete_temp_file (char *tmp, int force)
{
if (!tmp)
return;
- if (force || !keep_cache) remove (tmp);
+ if (force || keep_cache != 1) remove (tmp);
RELEASE(tmp);
return;
diff --git a/Build/source/texk/dvipdfmx/src/dvipdfmx.c b/Build/source/texk/dvipdfmx/src/dvipdfmx.c
index 91371e5713a..cde17f051a6 100644
--- a/Build/source/texk/dvipdfmx/src/dvipdfmx.c
+++ b/Build/source/texk/dvipdfmx/src/dvipdfmx.c
@@ -89,7 +89,8 @@ static int pdfdecimaldigits = 2;
/* Image cache life in hours */
/* 0 means erase all old images and leave new images */
/* -1 means erase all old images and also erase new images */
-static int image_cache_life = -1;
+/* -2 means ignore image cache (default) */
+static int image_cache_life = -2;
/* Encryption */
static int do_encryption = 0;
@@ -186,9 +187,10 @@ show_usage (void)
fprintf(stdout, "\t\tAnd negative values replace old values.\n");
fprintf(stdout, "-D template\tPS->PDF conversion command line template [none]\n");
fprintf(stdout, "-E \t\tEnable DVIPDFM emulation mode\n");
- fprintf(stdout, "-I number\tImage cache life in hours [-1]\n");
+ fprintf(stdout, "-I number\tImage cache life in hours [-2]\n");
fprintf(stdout, " \t 0: erase all old images and leave new images\n");
fprintf(stdout, " \t-1: erase all old images and also erase new images\n");
+ fprintf(stdout, " \t-2: ignore image cache\n");
fprintf(stdout, "-K number\tEncryption key length [40]\n");
fprintf(stdout, "-O number\tSet maximum depth of open bookmark items [0]\n");
fprintf(stdout, "-P number\tSet permission flags for PDF encryption [0x003C]\n");
diff --git a/Build/source/texk/dvipdfmx/src/pdfximage.c b/Build/source/texk/dvipdfmx/src/pdfximage.c
index 1c18ea2ff9c..ff81ac697fb 100644
--- a/Build/source/texk/dvipdfmx/src/pdfximage.c
+++ b/Build/source/texk/dvipdfmx/src/pdfximage.c
@@ -193,7 +193,7 @@ pdf_close_images (void)
* We also use this to convert a PS file only once if multiple
* pages are imported from that file.
*/
- if (_opts.verbose > 1 && !keep_cache)
+ if (_opts.verbose > 1 && keep_cache != 1)
MESG("pdf_image>> deleting temporary file \"%s\"\n", I->filename);
dpx_delete_temp_file(I->filename, false); /* temporary filename freed here */
I->filename = NULL;
@@ -883,19 +883,19 @@ ps_include_page (pdf_ximage *ximage)
return -1;
}
- if (_opts.verbose > 1) {
- MESG("\n");
- MESG("pdf_image>> Converting file \"%s\" --> \"%s\" via:\n", filename, temp);
- MESG("pdf_image>> %s\n", distiller_template);
- MESG("pdf_image>> ...");
- }
-
- if (stat(temp, &stat_t)==0 && stat(filename, &stat_o)==0
+ if (keep_cache != -1 && stat(temp, &stat_t)==0 && stat(filename, &stat_o)==0
&& stat_t.st_mtime > stat_o.st_mtime) {
/* cache exist */
/*printf("\nLast file modification: %s", ctime(&stat_o.st_mtime));
printf("Last file modification: %s", ctime(&stat_t.st_mtime));*/
+ ;
} else {
+ if (_opts.verbose > 1) {
+ MESG("\n");
+ MESG("pdf_image>> Converting file \"%s\" --> \"%s\" via:\n", filename, temp);
+ MESG("pdf_image>> %s\n", distiller_template);
+ MESG("pdf_image>> ...");
+ }
error = dpx_file_apply_filter(distiller_template, filename, temp,
(unsigned char) pdf_get_version());
if (error) {
diff --git a/Build/source/texk/xdvipdfmx/ChangeLog b/Build/source/texk/xdvipdfmx/ChangeLog
index 793cece50e7..ddc671f164a 100644
--- a/Build/source/texk/xdvipdfmx/ChangeLog
+++ b/Build/source/texk/xdvipdfmx/ChangeLog
@@ -1,3 +1,9 @@
+2013-04-30 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * src/dpxfile.c, src/pdfximage.c, src/dvipdfmx.c, data/dvipdfmx.cfg:
+ Add c compatible mode with the old behavior per Karl, where
+ image cache is ignored.
+
2013-04-30 Peter Breitenlohner <peb@mppmu.mpg.de>
* xdvipdfmx.test: New shell script for a simple test.
diff --git a/Build/source/texk/xdvipdfmx/data/dvipdfmx.cfg b/Build/source/texk/xdvipdfmx/data/dvipdfmx.cfg
index 3aca31fd2ed..d1284adcafd 100644
--- a/Build/source/texk/xdvipdfmx/data/dvipdfmx.cfg
+++ b/Build/source/texk/xdvipdfmx/data/dvipdfmx.cfg
@@ -1,221 +1,222 @@
-%% dvipdfmx.cfg for dvipdfmx and xdvipdfmx. (Public domain.)
-%%
-%% PDF Version Setting
-%%
-%% PDF (minor) version stamp to use in output file.
-%% This also implies maximal version of PDF file allowed to be included.
-%% Dvipdfmx does not support 1.0, 1.1, 1.2 since TrueType font embedded
-%% as CIDFontType2 requires at least version 1.3. Transparent imaging
-%% model requires version 1.4. So if you want soft-masking support for
-%% PNG image with alpha channels, you should set version to 4 or higher.
-%% PDF 1.5 enables object compression.
-
-V 5
-
-%% Dvipdfmx Compatibility Flags
-%%
-%% 0x0002 Use semi-transparent filling for tpic shading command,
-%% instead of opaque gray color. (requires PDF 1.4)
-%% 0x0004 Treat all CIDFont as fixed-pitch font.
-%% This is only for backward compatibility. Don't use that.
-%% 0x0008 Do not replace duplicate fontmap entries.
-%% Dvipdfm's (not 'x') behaviour.
-%% 0x0010 Do not optimize PDF destinations. Use this if you want to
-%% refer from other files to destinations in the current file.
-
-%C 0x0000
-
-%% PDF Document Settings
-%%
-%% Papersize Option:
-%%
-%% p papersize-spec
-%%
-%% papersize-spec is 'paper-format' or length-pair, e.g., 'a4', 'letter',
-%% '20cm,30cm'. Recognized unit is 'cm', 'mm', 'bp', 'pt', 'in'.
-
-p a4
-
-%% Annotation Box Margin:
-%%
-%% g length
-%%
-%% Add margin to annotation rectangle created via various \specials. Many
-%% TeX macro packages set the annotation bounding box equal to the TeX box
-%% that encloses the material. That's not always what you want.
-%% Annotations created by pdf:bannot/pdf:eannot is also affected.
-
-%g 0
-
-%% Bookmark Open Level:
-%%
-%% O integer
-%%
-%% Mark bookmark (outline) item as initial state 'open' if the depth
-%% of that item (from root node) is less than or equal to the integer
-%% specified with this option.
-
-O 0
-
-%% PDF Security (Encryption) Setting
-%%
-%% Those options won't take effects unless you use flag 'S'.
-%%
-%% Key bits for PDF encryption (40 - 128)
-
-K 40
-
-%% Permission flag for PDF encryption: Revision will be 3 if the key size
-%% is greater than 40 bits.
-%%
-%% 0x0004 (Revision 2) Print the document.
-%% (Revision 3) Print the document (possibly not at the highest quality
-%% level, depending on whether bit 12[0x0800] is also set).
-%% 0x0008 Modify the contents of the document by operations other than those
-%% controlled by bits 6[0x0020], 9[0x0100], and 11[0x0400].
-%% 0x0010 (Revision 2) Copy or otherwise extract text and graphics from the
-%% document, including extracting text and graphics (in support of
-%% accessibility to disabled users or for other purposes).
-%% (Revision 3) Copy or otherwise extract text and grphics from the
-%% document by operations other than that controlled by bit 10[0x0200].
-%% 0x0020 Add or modify text annotations, fill in interactive form fields,
-%% and, if bit 4[0x0008] is also set, create or modify interactive
-%% form fields (including signature fields).
-%%
-%% (Revision 3 only)
-%% 0x0100 Fill in existing interactive form fields (including signature
-%% fields), even if bit 6 is clear.
-%% 0x0200 Extract text and graphics (in support of accessibility to disabled
-%% users or for other purposes).
-%% 0x0400 Assemble the document (insert, rotate, or delete pages and create
-%% bookmarks or thumbnail images), even if bit 4 is clear.
-%% 0x0800 Print the document to a representation from which a faithful digital
-%% copy of the PDF content could be generated. When this bit is clear
-%% (and bit 3 is set), printing is limited to a low-level representation
-%% of the appearance, possibly of degraded quality.
-
-P 0x003C
-
-%% Image Handler
-%%
-%% With 'D' option dvipdfmx may invoke shell command via system()
-%% function call.
-%%
-%% Command-line template for a-to-b conversion:
-%%
-%% Supported target format ('b') is currently PDF.
-%% Percent sign '%' is special character:
-%%
-%% %i Input file name (FQPN). Name of file to be converted to PDF.
-%% %o Output file name (FQPN). Temporary file to store conversion
-%% result. Removed after inclusion is finished. (regardless of
-%% success or failure)
-%% %b The "base" name of the input file, e.g., "foo" instead of
-%% "foo.eps".
-%% %v The PDF version to be converted to, e.g. "1.4" for PDF 1.4.
-%% %% Replaced with single '%'.
-
-%% Ghostscript (PS-to-PDF and PDF-to-PDF):
-%%
-%% ps2pdf is a front-end to gs. For a complete list of options, see
-%% http://ghostscript.com/doc/current/Ps2pdf.htm#Options
-%%
-%% By default, gs encodes all images contained in a PS file using
-%% the lossy DCT (i.e., JPEG) filter. This often leads to inferior
-%% result (see the discussion at http://electron.mit.edu/~gsteele/pdf/).
-%% The "-dAutoFilterXXXImages" and "-dXXXImageFilter" options used
-%% below force all images to be encoded with the lossless Flate (zlib,
-%% same as PNG) filter. Note that if the PS file already contains DCT
-%% encoded images (which is possible in PS level 2), then these images
-%% will also be re-encoded using Flate. To turn the conversion off,
-%% simply remove the options mentioned above.
-%%
-%% The -dEPSCROP below converts PS files. Before TL 2013,
-%% -sPAPERSIZE=a0 was used for this. In 2013, changes were made to
-%% xetex.def, dvipdfmx.def, etc., to handle non-zero llx/lly.
-%%
-%% In TeX Live, we use the rungs wrapper instead of ps2pdf, becuse we
-%% must omit the -dSAFER which ps2pdf specifies: in order for pstricks
-%% to work with xetex,
-%% /usr/local/texlive/*/texmf-dist/dvips/pstricks/pstricks.pro (for
-%% example) needs to be accessed. (Also, it is better to use our
-%% supplied gs on Windows.) You can also add -dNOSAFER to the ps2pdf
-%% command line.
-%%
-%% Incidentally, especially in TL, more than one dvipdfmx.cfg may be
-%% extant. You can find the one that is active by running:
-%% kpsewhich -progname=dvipdfmx -format='other text files' dvipdfmx.cfg
-%% and control which one is found by setting DVIPDFMXINPUTS.
-%%
-D "rungs -q -dNOPAUSE -dBATCH -dEPSCrop -sDEVICE=pdfwrite -dCompatibilityLevel=%v -dAutoFilterGrayImages=false -dGrayImageFilter=/FlateEncode -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -sOutputFile='%o' '%i' -c quit"
-
-% pre-2013 invocation using -sPAPERSIZE instead of -dEPSCrop, no other changes:
-%D "rungs -q -dNOPAUSE -dBATCH -sPAPERSIZE=a0 -sDEVICE=pdfwrite -dCompatibilityLevel=%v -dAutoFilterGrayImages=false -dGrayImageFilter=/FlateEncode -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -sOutputFile='%o' '%i' -c quit"
-
-% other random ps converters people have experimented with.
-%D "/usr/local/bin/ps2pdf -dEPSCrop '%i' '%o'"
-%D "/usr/texbin/epstopdf '%i' -o '%o'"
-%D "/usr/bin/pstopdf '%i' -o '%o'"
-%
-%% Frank Siegert's PStill:
-%D "/usr/local/bin/pstill -c -o '%o' '%i'"
-%
-%% Batik + Fop (SVG-to-PDF):
-%% If you want both PS and SVG, you need to write a script or program
-%% that selectively invokes converters.
-%D "java -classpath classpaths -jar /path/to/batik-rasterizer.jar -m application/pdf -d '%o' '%i'"
-%
-%% There are no way to directly know suggested size of (raster) images.
-%% You may want to use %b here, since you can try reading the ebb file
-%% to see what is natural (physical) size of images.
-%D "ras2pdf -r 300x300 -b '%b.bb' -o '%o' '%i'"
-%
-%% ImageMagick:
-%% Easiest way to support various file formats.
-%D "convert '%i' 'epdf:%o'"
-
-%% Other Options
-%%
-%% DPI for PK font creation
-
-%r 600
-
-%% Set number of fractional digit kept for various numbers in PDF page
-%% content output. By setting this to 2 (default), dvipdfmx rounds
-%% real numbers at 2nd fractional (decimal) digit; e.g., "3.14159" is
-%% written as "3.14". Increasing this to more than 2 isn't meaningful
-%% for old Acrobat due to implementation limit of Acrobat.
-%% Length 0.01 in unscaled coordinate system amount to width of 1 pixel
-%% in 7200ppi display.
-
-%d 5
-
-%% Image cache life in hours
-%% 0 means erase all old images and leave new images
-%% -1 means erase all old images and also erase new images
-%I -1
-
-%% Font Map Files
-%%
-%% teTeX 2.x and TeX Live using updmap (pdfTeX format)
-f pdftex.map
-
-%% teTeX 2.x and TeX Live using updmap (DVIPDFM format)
-%f dvipdfm.map
-
-%% teTeX 2.x and TeX Live using updmap (DVIPS format)
-%% MiKTeX 2.2 and 2.3
-%f psfonts.map
-
-%% Put additional fontmap files here (usually for Type0 fonts)
-%f cid-x.map
-
-% the following file is generated by updmap(-sys) from the
-% KanjiMap entries in the updmap.cfg file.
-f kanjix.map
-% minimal example for Chinese and Korean users
-% improvements please to tex-live@tug.org
-f ckx.map
-
-%% Include other config files
-%i <filename>
+%% dvipdfmx.cfg for dvipdfmx and xdvipdfmx. (Public domain.)
+%%
+%% PDF Version Setting
+%%
+%% PDF (minor) version stamp to use in output file.
+%% This also implies maximal version of PDF file allowed to be included.
+%% Dvipdfmx does not support 1.0, 1.1, 1.2 since TrueType font embedded
+%% as CIDFontType2 requires at least version 1.3. Transparent imaging
+%% model requires version 1.4. So if you want soft-masking support for
+%% PNG image with alpha channels, you should set version to 4 or higher.
+%% PDF 1.5 enables object compression.
+
+V 5
+
+%% Dvipdfmx Compatibility Flags
+%%
+%% 0x0002 Use semi-transparent filling for tpic shading command,
+%% instead of opaque gray color. (requires PDF 1.4)
+%% 0x0004 Treat all CIDFont as fixed-pitch font.
+%% This is only for backward compatibility. Don't use that.
+%% 0x0008 Do not replace duplicate fontmap entries.
+%% Dvipdfm's (not 'x') behaviour.
+%% 0x0010 Do not optimize PDF destinations. Use this if you want to
+%% refer from other files to destinations in the current file.
+
+%C 0x0000
+
+%% PDF Document Settings
+%%
+%% Papersize Option:
+%%
+%% p papersize-spec
+%%
+%% papersize-spec is 'paper-format' or length-pair, e.g., 'a4', 'letter',
+%% '20cm,30cm'. Recognized unit is 'cm', 'mm', 'bp', 'pt', 'in'.
+
+p a4
+
+%% Annotation Box Margin:
+%%
+%% g length
+%%
+%% Add margin to annotation rectangle created via various \specials. Many
+%% TeX macro packages set the annotation bounding box equal to the TeX box
+%% that encloses the material. That's not always what you want.
+%% Annotations created by pdf:bannot/pdf:eannot is also affected.
+
+%g 0
+
+%% Bookmark Open Level:
+%%
+%% O integer
+%%
+%% Mark bookmark (outline) item as initial state 'open' if the depth
+%% of that item (from root node) is less than or equal to the integer
+%% specified with this option.
+
+O 0
+
+%% PDF Security (Encryption) Setting
+%%
+%% Those options won't take effects unless you use flag 'S'.
+%%
+%% Key bits for PDF encryption (40 - 128)
+
+K 40
+
+%% Permission flag for PDF encryption: Revision will be 3 if the key size
+%% is greater than 40 bits.
+%%
+%% 0x0004 (Revision 2) Print the document.
+%% (Revision 3) Print the document (possibly not at the highest quality
+%% level, depending on whether bit 12[0x0800] is also set).
+%% 0x0008 Modify the contents of the document by operations other than those
+%% controlled by bits 6[0x0020], 9[0x0100], and 11[0x0400].
+%% 0x0010 (Revision 2) Copy or otherwise extract text and graphics from the
+%% document, including extracting text and graphics (in support of
+%% accessibility to disabled users or for other purposes).
+%% (Revision 3) Copy or otherwise extract text and grphics from the
+%% document by operations other than that controlled by bit 10[0x0200].
+%% 0x0020 Add or modify text annotations, fill in interactive form fields,
+%% and, if bit 4[0x0008] is also set, create or modify interactive
+%% form fields (including signature fields).
+%%
+%% (Revision 3 only)
+%% 0x0100 Fill in existing interactive form fields (including signature
+%% fields), even if bit 6 is clear.
+%% 0x0200 Extract text and graphics (in support of accessibility to disabled
+%% users or for other purposes).
+%% 0x0400 Assemble the document (insert, rotate, or delete pages and create
+%% bookmarks or thumbnail images), even if bit 4 is clear.
+%% 0x0800 Print the document to a representation from which a faithful digital
+%% copy of the PDF content could be generated. When this bit is clear
+%% (and bit 3 is set), printing is limited to a low-level representation
+%% of the appearance, possibly of degraded quality.
+
+P 0x003C
+
+%% Image Handler
+%%
+%% With 'D' option dvipdfmx may invoke shell command via system()
+%% function call.
+%%
+%% Command-line template for a-to-b conversion:
+%%
+%% Supported target format ('b') is currently PDF.
+%% Percent sign '%' is special character:
+%%
+%% %i Input file name (FQPN). Name of file to be converted to PDF.
+%% %o Output file name (FQPN). Temporary file to store conversion
+%% result. Removed after inclusion is finished. (regardless of
+%% success or failure)
+%% %b The "base" name of the input file, e.g., "foo" instead of
+%% "foo.eps".
+%% %v The PDF version to be converted to, e.g. "1.4" for PDF 1.4.
+%% %% Replaced with single '%'.
+
+%% Ghostscript (PS-to-PDF and PDF-to-PDF):
+%%
+%% ps2pdf is a front-end to gs. For a complete list of options, see
+%% http://ghostscript.com/doc/current/Ps2pdf.htm#Options
+%%
+%% By default, gs encodes all images contained in a PS file using
+%% the lossy DCT (i.e., JPEG) filter. This often leads to inferior
+%% result (see the discussion at http://electron.mit.edu/~gsteele/pdf/).
+%% The "-dAutoFilterXXXImages" and "-dXXXImageFilter" options used
+%% below force all images to be encoded with the lossless Flate (zlib,
+%% same as PNG) filter. Note that if the PS file already contains DCT
+%% encoded images (which is possible in PS level 2), then these images
+%% will also be re-encoded using Flate. To turn the conversion off,
+%% simply remove the options mentioned above.
+%%
+%% The -dEPSCROP below converts PS files. Before TL 2013,
+%% -sPAPERSIZE=a0 was used for this. In 2013, changes were made to
+%% xetex.def, dvipdfmx.def, etc., to handle non-zero llx/lly.
+%%
+%% In TeX Live, we use the rungs wrapper instead of ps2pdf, becuse we
+%% must omit the -dSAFER which ps2pdf specifies: in order for pstricks
+%% to work with xetex,
+%% /usr/local/texlive/*/texmf-dist/dvips/pstricks/pstricks.pro (for
+%% example) needs to be accessed. (Also, it is better to use our
+%% supplied gs on Windows.) You can also add -dNOSAFER to the ps2pdf
+%% command line.
+%%
+%% Incidentally, especially in TL, more than one dvipdfmx.cfg may be
+%% extant. You can find the one that is active by running:
+%% kpsewhich -progname=dvipdfmx -format='other text files' dvipdfmx.cfg
+%% and control which one is found by setting DVIPDFMXINPUTS.
+%%
+D "rungs -q -dNOPAUSE -dBATCH -dEPSCrop -sDEVICE=pdfwrite -dCompatibilityLevel=%v -dAutoFilterGrayImages=false -dGrayImageFilter=/FlateEncode -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -sOutputFile='%o' '%i' -c quit"
+
+% pre-2013 invocation using -sPAPERSIZE instead of -dEPSCrop, no other changes:
+%D "rungs -q -dNOPAUSE -dBATCH -sPAPERSIZE=a0 -sDEVICE=pdfwrite -dCompatibilityLevel=%v -dAutoFilterGrayImages=false -dGrayImageFilter=/FlateEncode -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -sOutputFile='%o' '%i' -c quit"
+
+% other random ps converters people have experimented with.
+%D "/usr/local/bin/ps2pdf -dEPSCrop '%i' '%o'"
+%D "/usr/texbin/epstopdf '%i' -o '%o'"
+%D "/usr/bin/pstopdf '%i' -o '%o'"
+%
+%% Frank Siegert's PStill:
+%D "/usr/local/bin/pstill -c -o '%o' '%i'"
+%
+%% Batik + Fop (SVG-to-PDF):
+%% If you want both PS and SVG, you need to write a script or program
+%% that selectively invokes converters.
+%D "java -classpath classpaths -jar /path/to/batik-rasterizer.jar -m application/pdf -d '%o' '%i'"
+%
+%% There are no way to directly know suggested size of (raster) images.
+%% You may want to use %b here, since you can try reading the ebb file
+%% to see what is natural (physical) size of images.
+%D "ras2pdf -r 300x300 -b '%b.bb' -o '%o' '%i'"
+%
+%% ImageMagick:
+%% Easiest way to support various file formats.
+%D "convert '%i' 'epdf:%o'"
+
+%% Other Options
+%%
+%% DPI for PK font creation
+
+%r 600
+
+%% Set number of fractional digit kept for various numbers in PDF page
+%% content output. By setting this to 2 (default), dvipdfmx rounds
+%% real numbers at 2nd fractional (decimal) digit; e.g., "3.14159" is
+%% written as "3.14". Increasing this to more than 2 isn't meaningful
+%% for old Acrobat due to implementation limit of Acrobat.
+%% Length 0.01 in unscaled coordinate system amount to width of 1 pixel
+%% in 7200ppi display.
+
+%d 5
+
+%% Image cache life in hours
+%% 0 means erase all old images and leave new images
+%% -1 means erase all old images and also erase new images
+%% -2 means ignore image cache
+%I -2
+
+%% Font Map Files
+%%
+%% teTeX 2.x and TeX Live using updmap (pdfTeX format)
+f pdftex.map
+
+%% teTeX 2.x and TeX Live using updmap (DVIPDFM format)
+%f dvipdfm.map
+
+%% teTeX 2.x and TeX Live using updmap (DVIPS format)
+%% MiKTeX 2.2 and 2.3
+%f psfonts.map
+
+%% Put additional fontmap files here (usually for Type0 fonts)
+%f cid-x.map
+
+% the following file is generated by updmap(-sys) from the
+% KanjiMap entries in the updmap.cfg file.
+f kanjix.map
+% minimal example for Chinese and Korean users
+% improvements please to tex-live@tug.org
+f ckx.map
+
+%% Include other config files
+%i <filename>
diff --git a/Build/source/texk/xdvipdfmx/src/dpxfile.c b/Build/source/texk/xdvipdfmx/src/dpxfile.c
index 80998652a11..b904bea8055 100644
--- a/Build/source/texk/xdvipdfmx/src/dpxfile.c
+++ b/Build/source/texk/xdvipdfmx/src/dpxfile.c
@@ -61,7 +61,7 @@
#endif
static int verbose = 0;
-int keep_cache = false;
+int keep_cache = 0;
void
dpx_file_set_verbose (void)
@@ -899,7 +899,11 @@ dpx_delete_old_cache (int life)
struct dirent *de;
time_t limit = time(NULL) - life * 60 * 60;
- if (life >= 0) keep_cache = true;
+ if (life == -2) {
+ keep_cache = -1;
+ return;
+ }
+ if (life >= 0) keep_cache = 1;
if ((dp = opendir(dir)) != NULL) {
while((de = readdir(dp)) != NULL) {
if (dpx_clear_cache_filter(de)) {
@@ -922,7 +926,7 @@ dpx_delete_temp_file (char *tmp, int force)
{
if (!tmp)
return;
- if (force || !keep_cache) remove (tmp);
+ if (force || keep_cache != 1) remove (tmp);
RELEASE(tmp);
return;
diff --git a/Build/source/texk/xdvipdfmx/src/dvipdfmx.c b/Build/source/texk/xdvipdfmx/src/dvipdfmx.c
index ac82c2cdf56..ac97ed11198 100644
--- a/Build/source/texk/xdvipdfmx/src/dvipdfmx.c
+++ b/Build/source/texk/xdvipdfmx/src/dvipdfmx.c
@@ -91,7 +91,8 @@ static int pdfdecimaldigits = 2;
/* Image cache life in hours */
/* 0 means erase all old images and leave new images */
/* -1 means erase all old images and also erase new images */
-static int image_cache_life = -1;
+/* -2 means ignore image cache (default) */
+static int image_cache_life = -2;
/* Encryption */
static int do_encryption = 0;
@@ -190,9 +191,10 @@ usage (int exit_code)
fprintf (stdout, "\t\tAnd negative values replace old values.\n");
fprintf (stdout, "-D template\tPS->PDF conversion command line template [none]\n");
fprintf (stdout, "-E \t\tAlways try to embed fonts, regardless of licensing flags.\n");
- fprintf (stdout, "-I number\tImage cache life in hours [-1]\n");
+ fprintf (stdout, "-I number\tImage cache life in hours [-2]\n");
fprintf (stdout, " \t 0: erase all old images and leave new images\n");
fprintf (stdout, " \t-1: erase all old images and also erase new images\n");
+ fprintf (stdout, " \t-2: ignore image cache\n");
fprintf (stdout, "-K number\tEncryption key length [40]\n");
fprintf (stdout, "-O number\tSet maximum depth of open bookmark items [0]\n");
fprintf (stdout, "-P number\tSet permission flags for PDF encryption [0x003C]\n");
diff --git a/Build/source/texk/xdvipdfmx/src/pdfximage.c b/Build/source/texk/xdvipdfmx/src/pdfximage.c
index 6ac7b87f481..f16829f18ba 100644
--- a/Build/source/texk/xdvipdfmx/src/pdfximage.c
+++ b/Build/source/texk/xdvipdfmx/src/pdfximage.c
@@ -191,7 +191,7 @@ pdf_close_images (void)
* We also use this to convert a PS file only once if multiple
* pages are imported from that file.
*/
- if (_opts.verbose > 1 && !keep_cache)
+ if (_opts.verbose > 1 && keep_cache != 1)
MESG("pdf_image>> deleting temporary file \"%s\"\n", I->filename);
dpx_delete_temp_file(I->filename, false); /* temporary filename freed here */
I->filename = NULL;
@@ -855,12 +855,6 @@ ps_include_page (pdf_ximage *ximage, const char *filename)
return -1;
}
- if (_opts.verbose > 1) {
- MESG("\n");
- MESG("pdf_image>> Converting file \"%s\" --> \"%s\" via:\n", filename, temp);
- MESG("pdf_image>> %s\n", distiller_template);
- MESG("pdf_image>> ...");
- }
#ifdef MIKTEX
{
char *p;
@@ -872,12 +866,19 @@ ps_include_page (pdf_ximage *ximage, const char *filename)
}
}
#endif
- if (stat(temp, &stat_t)==0 && stat(filename, &stat_o)==0
+ if (keep_cache != -1 && stat(temp, &stat_t)==0 && stat(filename, &stat_o)==0
&& stat_t.st_mtime > stat_o.st_mtime) {
/* cache exist */
/*printf("\nLast file modification: %s", ctime(&stat_o.st_mtime));
printf("Last file modification: %s", ctime(&stat_t.st_mtime));*/
+ ;
} else {
+ if (_opts.verbose > 1) {
+ MESG("\n");
+ MESG("pdf_image>> Converting file \"%s\" --> \"%s\" via:\n", filename, temp);
+ MESG("pdf_image>> %s\n", distiller_template);
+ MESG("pdf_image>> ...");
+ }
error = dpx_file_apply_filter(distiller_template, filename, temp,
(unsigned char) pdf_get_version());
if (error) {