diff options
author | Karl Berry <karl@freefriends.org> | 2020-01-19 22:43:24 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-01-19 22:43:24 +0000 |
commit | 840be758be5db336a1a97c8d7ef033c4e0db03c9 (patch) | |
tree | f58f1dd9674a4a6a6c2cb4a6e5780361448955e3 /Master/texmf-dist/scripts/epspdf | |
parent | dade70ece53166233c46dbd45cf3e56e06eaa99e (diff) |
epspdf
git-svn-id: svn://tug.org/texlive/trunk@53459 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/epspdf')
-rw-r--r-- | Master/texmf-dist/scripts/epspdf/epspdf.help | 78 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/epspdf/epspdf.tlu | 17 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/epspdf/epspdftk.tcl | 65 |
3 files changed, 57 insertions, 103 deletions
diff --git a/Master/texmf-dist/scripts/epspdf/epspdf.help b/Master/texmf-dist/scripts/epspdf/epspdf.help index 8ee499c019b..c200849f0a5 100644 --- a/Master/texmf-dist/scripts/epspdf/epspdf.help +++ b/Master/texmf-dist/scripts/epspdf/epspdf.help @@ -24,26 +24,23 @@ Epspdf and epspdftk 5 Troubleshooting 5.1 No options for output format visible 5.2 Ghostscript stackunderflow error - 5.3 Error message mentioning failure of pdf_crop - 5.4 Wrong boundingbox (.eps or .ps output) - 5.5 Part of the graphic gets cut off - 5.6 Fonts look ugly - 5.7 The page has been converted to a bitmap - 5.8 Temporary files are not removed - 5.9 Resources for troubleshooting + 5.3 Part of the graphic gets cut off + 5.4 Fonts look ugly + 5.5 The page has been converted to a bitmap + 5.6 Temporary files are not removed + 5.7 Resources for troubleshooting Appendix A Requirements Appendix B Change history - B.1 Version 0.6.5 - B.2 Version 0.6.4 - B.3 Version 0.6 - B.4 Version 0.5 - B.5 Version 0.4 + B.1 Version 6.4 + B.2 Version 0.6 + B.3 Version 0.5 + B.4 Version 0.4 Epspdf and epspdftk ******************* -This manual is for epspdf and epspdftk, version 0.6.5. +This manual is for epspdf and epspdftk, version 0.6.4. -Copyright (C) 2006-2020 Siep Kroonenberg. +Copyright (C) 2006-2019 Siep Kroonenberg. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided @@ -119,9 +116,6 @@ in this screen. Epspdf looks for a number of PostScript- and pdf viewers, from which you can select one, but you can also enter one manually. -Some viewers require a plugin for eps and PostScript. The GUI does not -check whether such a plugin is actually installed. - For Windows and Mac OS there is no such configuration option. Epspdf will use the program associated with the file type, which can be configured outside epspdf. @@ -169,7 +163,7 @@ elaborate command-line interface. Below, we assume that there is a suitable wrapper or symlink for epspdf on your searchpath. This is the case if you installed epspdf as a TeX -Live- or MiKTeX package. +Live package. Basic usage of epspdf itself: @@ -352,26 +346,14 @@ when converting to pdf: selecting "printer" as target may lead to an error 'stackunderflow in .setdistillerparams'. If you run into this, use the "default" or "prepress" target instead. -5.3 Error message mentioning failure of pdf_crop -================================================ - -Problably, the luatex format has not been generated. Fix this with TeX -Live Manager or with the MiKTeX Console. - -5.4 Wrong boundingbox (.eps or .ps output) -========================================== - -This may be a bug in pdftops. Do not use pdftops (epspdftk: see -configuration screen; command-line epspdf: use the "-I" option) - -5.5 Part of the graphic gets cut off +5.3 Part of the graphic gets cut off ==================================== -If the PostScript file was generated with the old Windows PostScript -driver, experiment with the PostScript Output option. Don't choose -Optimize for Speed. +If the PostScript file was generated with the Windows PostScript driver, +experiment with the PostScript Output option. Don't choose Optimize for +Speed. -5.6 Fonts look ugly +5.4 Fonts look ugly =================== If Ghostscript has to do the conversion from pdf to ps then text may not @@ -380,7 +362,7 @@ tend to do better in this respect than older ones, but as to preserving fonts, the pdftops utility may still handle more cases. It is part of the xpdf suite and of the Poppler utilities. -5.7 The page has been converted to a bitmap +5.5 The page has been converted to a bitmap =========================================== The usual cause is that the page contains features such as transparency @@ -389,7 +371,7 @@ which are not supported by the target format. Otherwise, set pdf target use and target version both to "default" to avoid unnecessary conversions: '-T default -N default' -5.8 Temporary files are not removed +5.6 Temporary files are not removed =================================== * Command-line: make sure that you did not specify the option '-d'. @@ -400,7 +382,7 @@ avoid unnecessary conversions: '-T default -N default' However, you should have no trouble removing temporary files manually. -5.9 Resources for troubleshooting +5.7 Resources for troubleshooting ================================= Logfile. The GUI has a button for viewing log output. This same output @@ -447,18 +429,8 @@ creates a menu shortcut and an uninstaller. Appendix B Change history ************************* -B.1 Version 0.6.5 -================= - -Epspdf: Compatibility change for ghostscript 9.50 and later. - -Epspdftk: improvements to viewer selection; does not impact Windows or -MacOS. - -A few updates to the manual, mostly for the troubleshooting section. - -B.2 Version 0.6.4 -================= +B.1 Version 6.4 +=============== Compatibility changes for luatex 1.9 and later. @@ -471,7 +443,7 @@ The GUI now requires Tcl/Tk version 8.5 or higher. On Windows, epspdf.tlu is now invoked via a batchfile. This should prevent black console windows popping up. -B.3 Version 0.6 +B.2 Version 0.6 =============== The command-line backend component has been rewritten in texlua and @@ -490,7 +462,7 @@ The current version has no provisions for custom Ghostscript- or pdftops parameters. The corresponding command-line options are accepted but have no effect. -B.4 Version 0.5 +B.3 Version 0.5 =============== The GUI has been rewritten in Tcl/Tk, removing the dependence on the @@ -524,7 +496,7 @@ the desired pdf version. The "-info" option now also prints the number of pages for pdf files. -B.5 Version 0.4 +B.4 Version 0.4 =============== Hi-res boundingboxes are now supported. By default, conversion from eps diff --git a/Master/texmf-dist/scripts/epspdf/epspdf.tlu b/Master/texmf-dist/scripts/epspdf/epspdf.tlu index 1dba171bf18..0007ade0742 100755 --- a/Master/texmf-dist/scripts/epspdf/epspdf.tlu +++ b/Master/texmf-dist/scripts/epspdf/epspdf.tlu @@ -11,10 +11,8 @@ epspdf conversion utility 0.6.3: compatibility fixes for luatex 0.9x 0.6.4: adaptations for newer versions of LuaTeX and ghostscript; some refactoring; better handling of some corner cases -0.6.5: eliminate .setpdfwrite from ghostscript commandlines, - since this is now considered obsolete -Copyright (C) 2006-2020 Siep Kroonenberg +Copyright (C) 2006-2019 Siep Kroonenberg siepo at bitmuis nl @@ -1897,13 +1895,17 @@ function any_to_any() -- `distiller' settings -- these depend on whether final output is pdf + -- '.setpdfwrite' is just some optimization option for ghostscript if options.type=='pdf' then if settings.pdf_target and (settings.pdf_target~='default') then table.insert(pdf_options, '-dPDFSETTINGS#/'..settings.pdf_target) end - if settings.pdf_target~='screen' and settings.pdf_target~='ebook' then + if settings.pdf_target=='screen' or settings.pdf_target=='ebook' then + pdf_tail_options = {'-c', '.setpdfwrite', '-f'} + -- -f ensures that the input filename is not added to the -c string + else pdf_tail_options = { - '-c', '<</NeverEmbed [ ] >> setdistillerparams', '-f'} + '-c', '.setpdfwrite <</NeverEmbed [ ] >> setdistillerparams', '-f'} end end @@ -2226,7 +2228,7 @@ descriptions.use_pdftops = 'Use pdftops if available' settings.ps_viewer = false descriptions.ps_viewer = - 'Epspdftk: viewer for PostScript files; not used on Windows or Mac OS' + 'Epspdftk: viewer for PostScript files; not used on Windows or OS X' settings.pdf_viewer = false descriptions.pdf_viewer = @@ -2269,8 +2271,7 @@ gs_options = {'-q', '-dNOPAUSE', '-dBATCH', '-P-', '-dSAFER'} pdf_options = {'-sDEVICE#pdfwrite'} -- '-dUseCIEColor' causes serious slowdown -- options for final conversion to pdf; -- will be completed after reading settings and options --- -f ensures that the input filename is not added to a -c string -pdf_tail_options = {'-f'} +pdf_tail_options = {'-c', '.setpdfwrite', '-f'} gray_options = {'-dProcessColorModel#/DeviceGray', '-sColorConversionStrategy#Gray'} diff --git a/Master/texmf-dist/scripts/epspdf/epspdftk.tcl b/Master/texmf-dist/scripts/epspdf/epspdftk.tcl index 5ea94b6f037..26ed17efcfd 100755 --- a/Master/texmf-dist/scripts/epspdf/epspdftk.tcl +++ b/Master/texmf-dist/scripts/epspdf/epspdftk.tcl @@ -3,7 +3,7 @@ # epspdf conversion utility, GUI frontend ##### -# Copyright (C) 2006-2020 Siep Kroonenberg +# Copyright (C) 2006-2019 Siep Kroonenberg # siepo at bitmuis dot nl # # This program is free software, licensed under the GNU GPL, >=2.0. @@ -130,38 +130,34 @@ proc getsettings {} { } # unix: viewer settings - # It may depend on installed plugins whether a pdf viewer - # can render postscript. - # AFAIK, no such plugins exist for xpdf or mupdf. - # chrome and firefox also only render pdf and not postscript. # configured viewer, if valid, heads the list if {$::classic_unix} { + set ::ps_viewers {} + if {$::settings(ps_viewer) ne "" && [is_prog $::settings(ps_viewer)]} { + lappend ::ps_viewers $::settings(ps_viewer) + } + foreach v {evince okular gv qpdfview} { + if {$v ne $::settings(ps_viewer) && [is_prog $v]} { + lappend ::ps_viewers $v + } + } + # puts [join $::ps_viewers " "] + set ::pdf_viewers {} if {$::settings(pdf_viewer) ne "" && [is_prog $::settings(pdf_viewer)]} { lappend ::pdf_viewers $::settings(pdf_viewer) } - foreach v { - atril evince okular qpdfview mupdf xpdf zathura gv firefox chrome \ - chromium chromium-browser} { + foreach v {evince okular mupdf qpdfview texworks xpdf zathura} { if {$v ne $::settings(pdf_viewer) && [is_prog $v]} { lappend ::pdf_viewers $v } } # puts [join $::pdf_viewers " "] - set ::ps_viewers {} - if {$::settings(ps_viewer) ne "" && [is_prog $::settings(ps_viewer)]} { - lappend ::ps_viewers $::settings(ps_viewer) - } - foreach v $::pdf_viewers { - if {$v ne $::settings(ps_viewer) && \ - $v ni {xpdf mupdf firefox chrome chromium chromium-browser}} { - lappend ::ps_viewers $v - } + if {[llength ::pdf_viewers] == 0 && [llength ::ps_viewers] != 0} { + lappend ::pdf_viewers [lindex $::ps_viewers 0] } - # puts [join $::ps_viewers " "] - if {[llength ::pdf_viewers] == 0} { tk_messageBox -message "No viewers found" } elseif {[llength ::ps_viewers] == 0} { @@ -231,30 +227,19 @@ proc ppack {b args} {pack $b {*}$args -padx 3 -pady 3} font create bfont {*}[font configure TkDefaultFont] font configure bfont -weight bold -proc update_combo w { - # check that a manually supplied entry is actually a program - # proc used for postscript- and pdf viewers - set vls [$w cget -values] +proc update_combo {w vls} { + upvar $vls vs set new [$w get] - if {$new ni $vls} { + if {$new ni $vs} { if {[is_prog $new]} { - set vls [linsert $vls 0 $new] - $w configure -values $vls + set vs [linsert $vs 0 $new] + $w configure -values $vs } else { - tk_messageBox -title Error -icon error -message "$new not a program" - raise .config_t - focus $w + tk_messageBox -title Error -icon error -message "$vl Not a program" } } } -proc revert_combo w { - # aborts entry of new value - if {[$w current] < 0} { - $w current 0 - } -} - ### and now the actual GUI ################################### wm title . "PostScript- and pdf conversions" @@ -334,15 +319,11 @@ if {$::classic_unix} { grid [ttk::combobox .config_t.viewf.pdf] -row 1 -column 1 -sticky e .config_t.viewf.pdf configure -values $::pdf_viewers .config_t.viewf.pdf configure -textvariable ::settings(pdf_viewer) - bind .config_t.viewf.pdf <Escape> {revert_combo %W} - bind .config_t.viewf.pdf <Return> {update_combo %W} - bind .config_t.viewf.pdf <FocusOut> {update_combo %W} + bind .config_t.viewf.pdf <Return> {update_combo %W $::pdf_viewers} grid [ttk::combobox .config_t.viewf.ps] -row 2 -column 1 -sticky e .config_t.viewf.ps configure -values $::ps_viewers .config_t.viewf.ps configure -textvariable ::settings(ps_viewer) - bind .config_t.viewf.ps <Escape> {revert_combo %W} - bind .config_t.viewf.ps <Return> {update_combo %W} - bind .config_t.viewf.ps <FocusOut> {update_combo %W} + bind .config_t.viewf.ps <Return> {update_combo %W $::ps_viewers} grid columnconfigure .config_t.viewf 1 -weight 1 -pad 2 } |