[changeset] improved support for pdf output

Ben Abbott bpabbott at mac.com
Wed Apr 8 05:54:20 CDT 2009


On Apr 8, 2009, at 1:34 AM, Michael D. Godfrey wrote:

> Ben,
>
> I just tried some tests with my good old subplot example.
> I get what I expected, but not what I want.
> Attached are 3 pdf files:
>
> tpdf.pdf  was created by directly running: print("tpdf.pdf","- 
> color","-solid")
>
> teps.pdf was created by:
> print("teps.eps","-color","-solid")
> ps2pdf14 teps.eps      %% this command produced  teps.pdf
>
> tps.pdf was created by;
> print("tps.ps","-color","-solid")
> ps2pdf14 tps.ps      %% this command produced  tps.pdf
>
> Obviously, what I would prefer is to get the output as in teps.pdf
> as the output in tpdf.pdf.

In order to remain consistent tpdf.pdf and tps.pdf should be the same  
(when not using convert, the pdf output looks like the ps output).

To be compatible with Matlab the white space around the plot is  
rendered correctly.

The change in font size is a gnuplot feature. You can adjust that by ...

	set (0, "showhiddenhandles")
	ht = findobj (gcf, "-property", "fontsize")
	set (ht, "fontsize", 8)
	print (gcf, "-pdpf", "tpdf-fs8.pdf")

I have a changeset prepared that renders the correct fontsize across  
all terminals, but there are still some "features" of gnuplot that it  
*may* be breaking (the text is not positioned correctly for bitmaps).

> I remember that you implemented eps differently from ps.
> For me it would be better to provide the eps setup for pdf.
> And, I do not now understand why ps and eps are handled
> so differently.
>
> This problem is not really a part of the pdf fix as such.  So, I
> would support pushing this as it is, and think about the ps vs. eps
> issue later if you want.
> With or without this fix I can still generate the .pdf that I need by
> using print("xxx.eps"), and then ps2pdf xxx.eps as I have been
> doing.  (This is what also works for the Manual.)
>
> Michael

Before pushing, I'd like to think about the implementation further.  
I'll plan to push at the end of my day (about 12hrs from now).

Ben



More information about the Octave-maintainers mailing list