Thursday, August 13, 2015

Embedding fonts in Windows-generated PDF files

Problem: PDF files generated from Office use TrueType fonts, which are not embedded into the PDF.

Solution: Run this script:

#!/bin/bash
mv $1 $1.bak

gs -dCompatibilityLevel=1.4 \
    -dPDFSETTINGS=/screen \
    -dCompressFonts=true \
    -dSubsetFonts=true \
    -dNOPAUSE \
    -dBATCH \
    -sDEVICE=pdfwrite \
    -sOutputFile=$1 \
    -c ".setpdfwrite <</NeverEmbed [ ]>> setdistillerparams" \
    -f $1.bak

pdffonts $1




See also: 

Tuesday, June 23, 2015

I/O error when booting Linux-on-USB through Virtualbox on Windows 7

This article provides remedy (in particular the setting to remove the read-only attribute).

Wednesday, April 22, 2015

Interesting Linux distributions

- elementary OS - looks very clean and seems to be suitable for weaker PCs (1 GB RAM, 15 GB disk space)
- Kubuntu 15.04 with Plasma 5 desktop - beautiful UI; for more powerful PCs

Monday, September 29, 2014

Finding Type 3 fonts in PDFs

It can be painful to fail the IEEE PDF check because of wrong fonts that made it into your PDF file. Here's a little shell script that helps to locate where Type 3 fonts are hiding.

#!/bin/bash

 for i in `seq 1 1 \`pdfinfo XXX.pdf|grep 'Pages'|cut -d: -f2|sed -e 's/ //g'\``
 do
   echo ""
   echo Page $i;
   echo "font name                            type              emb sub uni object ID"
   echo ------------------------------------ ----------------- --- --- --- ---------
   pdffonts -f $i -l $i XXX.pdf|grep 'Type 3';
 done

Tuesday, August 19, 2014

Multiple desktops in Windows 7

This small tool from Microsoft allows you to have 4 virtual desktops. There are also several alternatives out there in the open source world for more (and more flexible) virtual desktops.