Pages

Thursday, September 12, 2013

Octave PDF print error

Spent a while debugging a mysterious error with exporting PDF plots from Octave. To test if you have the same bug run the following commands on an octave prompt:

clear
close all
sombrero
print -deps temp.eps
print -dpdf temp.pdf

Now check for the following errors/warnings:

1. Did you get an error saying epstool binary not found?
Solution:
Install epstool from your package manager (synaptic or equivalent)

2. Did you get an error from Ghostscript?
e.g. GPL Ghostscript X.XX: Unrecoverable error, exit code 1

and/or

Is the EPS file unreadable?
Try to convert the EPS to pdf using ps2pdf temp.eps. If you get an error like "Error: /limitcheck in /fontfont" then there is a problem with the installed fonts. Try the diagnostic test described here [3]:
octave:1> set (0, "defaultaxesfontname", "Helvetica")
Solution: remove the package font-pagul. [1,2]

Links:
[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=662892
[2] http://octave.1599824.n4.nabble.com/3-6-1-produces-eps-files-that-are-unusable-on-Debian-wheezy-td4438420.html
[3] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=710272#17


No comments: