-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 El 2007-03-31 a las 20:40 +0200, escribí:
Probemos.
Pillo el fichero de pruebas de marras, le cambio la fuente a "Times" (existe), imprimo a fichero ps, convierto a pdf con ps2pdf:
cer@nimrodel:~/Documents/OO/test times font> l *pdf en\ 10.2/*pdf -rw-r--r-- 1 cer users 11302 2007-03-31 20:29 Prueba.pdf -rw-r--r-- 1 cer users 122486 2007-03-31 20:27 en 10.2/Prueba.pdf
Por lo pronto, el tamaño del pdf se ha reducido una barbaridad. Pinta bien. Pero:
cer@nimrodel:~/Documents/OO/test times font> pdffonts Prueba.pdf && pdffonts en\ 10.2/Prueba.pdf name type emb sub uni object ID ------------------------------------ ------------ --- --- --- --------- BLPGTW+NimbusRomNo9L-Regu Type 1C yes yes no 8 0 name type emb sub uni object ID
Sigue incrustando la fuente, aunque sólo una, de ahí la reducción.
Si miro con "less" en el fichero Prueba.ps, veo: %%BeginResource: font NimbusRomNo9L-Regu %!PS-AdobeFont-1.0: NimbusRomNo9L-Regu 1.06 %%Title: NimbusRomNo9L-Regu %%CreationDate: Tue Dec 31 16:49:50 2002 %%Creator: frob %%DocumentSuppliedResources: font NimbusRomNo9L-Regu % Copyright (URW)++,Copyright 1999 by (URW)++ Design & Development; Cyri % Generated by PfaEdit 1.0 (http://pfaedit.sf.net/) %%EndComments El propio ps lleva ya incrustada la fuente nimbus de marras, por lo que el conversor a pdf no tiene más narices que aceptarla. El manual del conversor está en "file:///usr/share/doc/packages/ghostscript-library/doc/Ps2pdf.htm". Observo que el parámetro "EmbedAllFonts" está a "On" por defecto, y en False para la optimización para pantalla. Sería: ps2pdf -dPDFSETTINGS=/screen Prueba.ps Prueba-noemb.pdf pero no funciona, porque Nimbus no la reconoce como Times. En el manual de antes, hay un parámetro, "NeverEmbed", con dos notas: (note 11) The default, screen, and ebook settings never embed the 14 standard fonts (Courier, Helvetica, and Times families, Symbol, and ZapfDingbats). (note 12) NeverEnbed can include CID font names. If a CID font is substituted in lib/cidfmap, the substitute font name is used when the CID font is embedded, and the original CID font name is used when it is not embedded. NeverEnbed should always specify the original CID font name. Creo que se refiere a "/usr/share/ghostscript/8.15/lib/cidfmap", que es un symlink a "/etc/ghostscript/8.15/cidfmap", que es un fichero que contiene esto: %! % $Id: cidfmap,v 1.7 2003/02/07 00:31:11 igor Exp $ % This is a sample map file for CIDFont category. % % The map is a set of records, which must use one of the two formats : % % 1. A substutution of a CIF font with another CID font : % % /substituted /original ; % % Where 'substituted' is a name being used in a document, % 'original' is a name of an available resource. % % 2. A substutution of a CIF font with a True Type font : % % /substituted << /FileType /TrueType /Path (path) /SunfontID 1 /CSI [(ordering) supplement] >> ; % % Where 'substituted' is a name being used in a document, % 'path' is a path to a True Type font file, % 'ordering' is a value of Ordering required for CIDSystemInfo dictionary, % 'supplement' is a value of Supplement required for CIDSystemInfo dictionary. % Añado esta linea: /NimbusRomNo9L-Regu /Times-Roman ; Y pruebo: cer@nimrodel:~/Varia/OO/test times font> ps2pdf -NeverEmbed=/true Prueba.ps Prueba-noemb.pdf && l *pdf && pdffonts Prueba-noemb.pdf -rw-r--r-- 1 cer users 11300 2007-03-31 21:46 Prueba-noemb.pdf -rw-r--r-- 1 cer users 11302 2007-03-31 20:29 Prueba.pdf name type emb sub uni object ID ------------------------------------ ------------ --- --- --- --------- BLPGTW+NimbusRomNo9L-Regu Type 1C yes yes no 8 0 Luego no funciona. Tampoco tengo ni idea de como hacer que suelte los errores por pantalla... Ah! No es "-NeverEmbed", sino "-dNeverEmbed=..." o "-sNeverEmbed=...", pero entonces si que suelta un error "CRIT: typecheck in .putdeviceprops" Buff. Perdida de tiempo... - -- Saludos Carlos E.R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD4DBQFGDtp6tTMYHG2NR9URAsJDAJURm4HNwOdmBd6qCC1PfQlannIHAJ49wHKN n0i2JV/mR7zBpkEjnseijA== =Tnz5 -----END PGP SIGNATURE-----