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

Re: PDF reader that overrides fonts



On Sat, Jun 07, 2008 at 11:25:10 -0500, Mumia W.. wrote:
> On 06/07/2008 07:29 AM, Florian Kulzer wrote:
>> [...]
>> I would be interested to know if these fonts are still listed as  
>> embedded if you run pdffonts on the final -NOFONTS.pdf. I will ask  
>> Dotan to send me his original file; maybe there is some document  
>> security option which has to be overridden.

[...]

> And the program "pdffonts" tells me that WEFAKP+GuttmanYad-Brush_00 and  
> SWNCWI+GuttmanYadLight_00 are still embedded in the file.

Hmm, these two fonts are missing in the /NeverEmbed list that you posted
earlier. Are these fonts reported with the same names, including the
"_00" part, if you run pdffonts on the original PDF?

I have meanwhile eliminated the need to generate the intermediate
postscript file and cleaned up the script. If you want you can try the
new version; it now accepts an output file name as an optional second
argument:

#! /bin/bash
#
# pdfstripsfonts: a simple wrapper script that invokes ghostscript
# to remove all embedded fonts from a PDF document (work in progress)

if [ -z "$1" ]
  then echo "Usage: ${0##*/} input_pdf [output_pdf]"
  exit 1
fi
INFILE="$1"

if [ -z "$2" ]
  then OUTFILE="${INFILE%.pdf}-NOFONTS.pdf"  
  else OUTFILE="$2"
fi

FONTS="$(pdffonts "$INFILE" | awk 'NR>2{ORS=" ";print "/"$1}')"

gs -q -dSAFER -dNOPAUSE -dBATCH \
   -sDEVICE=pdfwrite -sOutputFile="$OUTFILE" \
   -c ".setpdfwrite <</NeverEmbed [$FONTS]>> setdistillerparams" \
   -f "$INFILE"

-- 
Regards,            | http://users.icfo.es/Florian.Kulzer
          Florian   |


Reply to: