[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#411651: epstopdf: embedding all fonts (small patch)



Package: tetex-bin
Version: 3.0-29
Severity: normal
Tags: patch


The following small patch adds an option --embed to epstopdf which
makes epstopdf embed all fonts into the generated PDF.

This is very useful when using pdflatex to compile a document with
figures from EPS sources. Otherwise, if the figures contain
non-embedded fonts, the resulting PDF document won't have all fonts
embedded either, which, however, is requested by many publishers.

The patch works for me, but I'm no ghostscript expert to tell if this
is the best way to do it.

Regards,
Daniel

--- /usr/bin/epstopdf	2007-01-10 12:27:16.000000000 +0100
+++ /tmp/epstopdf	2007-02-20 11:31:51.000000000 +0100
@@ -90,6 +90,7 @@
 $::opt_exact=0;
 $::opt_filter=0;
 $::opt_outfile="";
+$::opt_embed=0;
 
 ### usage
 my @bool = ("false", "true");
@@ -103,6 +104,7 @@
   --(no)compress:   use compression       (default: $bool[$::opt_compress])
   --(no)hires:      scan HiResBoundingBox (default: $bool[$::opt_hires])
   --(no)exact:      scan ExactBoundingBox (default: $bool[$::opt_exact])
+  --(no)embed:      embed all fonts       (default: $bool[$::embed])
   --(no)debug:      debug informations    (default: $bool[$::opt_debug])
 Examples for producing 'test.pdf':
   * $program test.eps
@@ -123,6 +125,7 @@
   "hires!",
   "exact!",
   "outfile=s",
+  "embed!",
 ) or die $usage;
 
 ### help functions
@@ -162,6 +165,12 @@
 my $GSOPTS = "";
 $GSOPTS = "-dUseFlateCompression=false " unless $::opt_compress;
 
+### option embed
+if ($::opt_embed) {
+    $GSOPTS .= "-dPDFSETTINGS=/printer -dSubsetFonts=true"
+	. " -dEmbedAllFonts=true ";
+}
+
 ### option BoundingBox types
 my $BBName = "%%BoundingBox:";
 !($::opt_hires and $::opt_exact) or

-- System Information:
Debian Release: 4.0
  APT prefers testing-proposed-updates
  APT policy: (912, 'testing-proposed-updates'), (912, 'testing'), (910, 'proposed-updates'), (910, 'stable'), (103, 'experimental'), (103, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18
Locale: LANG=de_DE@euro, LC_CTYPE=de_DE@euro (charmap=ISO-8859-15)

Versions of packages tetex-bin depends on:
ii  debconf [debconf-2.0]     1.5.11         Debian configuration management sy
ii  debianutils               2.17           Miscellaneous utilities specific t
ii  dialog                    1.0-20060221-3 Displays user-friendly dialog boxe
ii  dpkg                      1.13.25        package maintenance system for Deb
ii  ed                        0.2-20         The classic unix line editor
ii  libc6                     2.3.6.ds1-11   GNU C Library: Shared libraries
ii  libfontconfig1            2.4.2-1        generic font configuration library
ii  libfreetype6              2.2.1-5        FreeType 2 font engine, shared lib
ii  libgcc1                   1:4.1.1-21     GCC support library
ii  libice6                   1:1.0.1-2      X11 Inter-Client Exchange library
ii  libjpeg62                 6b-13          The Independent JPEG Group's JPEG 
ii  libkpathsea4              3.0-29         path search library for teTeX (run
ii  libpaper1                 1.1.21         Library for handling paper charact
ii  libpng12-0                1.2.15~beta5-1 PNG library - runtime
ii  libpoppler0c2             0.4.5-5.1      PDF rendering library
ii  libsm6                    1:1.0.1-3      X11 Session Management library
ii  libstdc++6                4.1.1-21       The GNU Standard C++ Library v3
ii  libt1-5                   5.1.0-2        Type 1 font rasterizer library - r
ii  libx11-6                  2:1.0.3-5      X11 client-side library
ii  libxaw7                   1:1.0.2-4      X11 Athena Widget library
ii  libxext6                  1:1.0.1-2      X11 miscellaneous extension librar
ii  libxmu6                   1:1.0.2-2      X11 miscellaneous utility library
ii  libxpm4                   1:3.5.5-2      X11 pixmap library
ii  libxt6                    1:1.0.2-2      X11 toolkit intrinsics library
ii  mime-support              3.39-1         MIME files 'mime.types' & 'mailcap
ii  perl                      5.8.8-7        Larry Wall's Practical Extraction 
ii  sed                       4.1.5-1        The GNU sed stream editor
ii  tetex-base                3.0.dfsg.3-5   Basic TeX input files of teTeX
ii  tex-common                1.0            Common infrastructure for using an
ii  ucf                       2.0018.1       Update Configuration File: preserv
ii  whiptail                  0.52.2-9       Displays user-friendly dialog boxe
ii  zlib1g                    1:1.2.3-13     compression library - runtime

Versions of packages tetex-bin recommends:
ii  libxml-parser-perl           2.34-4.2    Perl module for parsing XML files
ii  perl-tk                      1:804.027-7 Perl module providing the Tk graph
ii  psutils                      1.17-24     A collection of PostScript documen

Versions of packages tetex-base depends on:
ii  tex-common                    1.0        Common infrastructure for using an
ii  ucf                           2.0018.1   Update Configuration File: preserv

Versions of packages tetex-extra depends on:
ii  tetex-base                  3.0.dfsg.3-5 Basic TeX input files of teTeX
ii  ucf                         2.0018.1     Update Configuration File: preserv

-- debconf information:
  tetex-base/olddat: true
  tetex-base/fmtutil-failed:
* tetex-bin/texmf: true
* tetex-base/oldcfg: true
* tetex-base/oldupdm: true
  tetex-base/updmap-failed:



Reply to: