gnuplot:如何确定 pdf 输出的版本

问题描述 投票:0回答:1

我将 gnuplot 导出为 PDF,如下所示:

gnuplot -e "set terminal cairolatex pdf ;set output 'file.tex';load 'file.gp'"

工作正常,但创建的 PDF 版本为 1.7。 所有其他材料都适用于 1.5,所以我想知道是否也可以减少到 1.5。

pdf latex gnuplot
1个回答
0
投票

这将是一条评论而不是答案,但它太长了,我无法以这种方式获得格式...

我很欣赏你的问题,因为我一直在尝试解决另一个方向的相关问题:“如何让 TeX 停止抱怨 gnuplot 生成的 pdf 文件?”。我能想到的最好的办法是:

% Prevent error/warning messages
%  "found PDF version '1.7' but at most version '1.5' allowed"
% Unfortunately this mechanism is specific to pdflatex.
% It can be commented out here to allow use of lualatex or xelatex.
  \pdfinclusionerrorlevel=1
  \pdfminorversion=7
  \pdfsuppresswarningpagegroup=1

你的问题让我意识到更好的方法是说服 gnuplot 生成标记为版本 1.5 的 pdf 输出。我窃听了电话

cairo_pdf_surface_restrict_to_version(surface, CAIRO_PDF_VERSION_1_5);

在 gnuplot pdf 终端源中确认这可以工作,但我还没有合适的补丁来检查库版本兼容性或添加选择它的用户命令。

© www.soinside.com 2019 - 2024. All rights reserved.