从 Mathematica 8 导出的 PDF 无法打印

发布于 2024-11-04 18:59:12 字数 1030 浏览 4 评论 0原文

更新:我写信给 Wolfram 支持人员询问此事,如果他们能解决问题,我将更新该帖子。抱歉,我向您发送了技术支持问题,但这里仍然保留,以防其他人遇到同样的问题。

还有其他人在使用 Mathematica 8 时遇到这个问题吗?我最近升级并注意到,当我将图形导出为 PDF 文件时,尽管该文件在我的计算机上显示正常,但打印时却显示为空白页。例如,尝试

Rectangle[{1,1}]//
Graphics//
Export["~/test.pdf",#]&

创建一个包含黑色方块的 PDF 文件。该文件打开正常,但如果我将其发送到我的部门打印机,我只会得到一张空白页。如果我不导出图形而是从 MM 打印笔记本,没问题,图形将按预期打印。如果我使用 MM 7 执行完全相同的操作,则 PDF 文件将按预期打印。在 MM8 中导出为 PNG 似乎工作正常。并且,使用上下文菜单 Save Graphics As ...File >将选择另存为... 创建仅包含图形的 PDF 也可以。然而,这些图形最终会包含在 TeX 文档中,如果我可以继续使用我所拥有的不需要单击任何按钮来生成它们的脚本,那就更好了。

我在 Mac OS 10.6.7 上运行 MM 8.0.0.0。我还无法在另一台打印机上对此进行测试,但这台打印机以前从未给我带来过问题,并且可以很好地打印其他 PDF 文档。有什么想法为什么会发生这种情况吗?

Wolfram Research 回应:

... 其他用户已将此问题报告为 好吧,我们的开发人员目前正在研究它。我已经添加了你的 报告中包含详细信息,以便您在问题解决后收到通知。

与此同时,您可以尝试的替代方案是:

  1. 尝试不同的打印机。
  2. 导出前使用“光栅化”功能对图像进行光栅化。如果 光栅化图像会失去一些分辨率,您可以使用该选项 “ImageResolution”来编辑它。

光栅化[图像,图像分辨率-> xxx]

UPDATE: I wrote to Wolfram support about this and will update the post if they can resolve the problem. Sorry for spamming SO with a technical support question, but here it remains in case anyone else is having the same issue.

Is anyone else having this problem with Mathematica 8? I recently upgraded and noticed that when I export Graphics to a PDF file, although the file appears fine on my computer, it prints as a blank page. For example, try

Rectangle[{1,1}]//
Graphics//
Export["~/test.pdf",#]&

which creates a PDF file containing a black square. This file opens fine, but if I send it to my department printer I just get a blank page. If I don't export the graphics but print the notebook from MM, no problem, the graphics print as expected. If I use MM 7 to do exactly the same thing, the PDF file prints as expected. Exporting to PNG in MM8 seems to work fine. And, using the context menu Save Graphics As ... or File > Save Selection As ... to create a PDF containing just the graphic also works. However, these graphics eventually get included in a TeX document, and it would be far better if I could continue using the script I've got that doesn't require any button clicking to generate them.

I'm running MM 8.0.0.0 on Mac OS 10.6.7. I have not been able to test this on another printer yet, but this printer has never given me problems before and prints other PDF documents fine. Any ideas why this is happening?

Wolfram Research responds:

...
This issue has been reported by other users as
well and our developers are currently looking into it. I have added your
details to the report so you can be notified when this is resolved.

In the meantime, the alternatives that you could try are:

  1. Try a different printer.
  2. Rasterize the image with the function 'Rasterize' before exporting. If
    the rasterized image loses some resolution, you could use the option
    'ImageResolution' to edit this.

Rasterize[image, ImageResolution -> xxx]

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

赢得她心 2024-11-11 18:59:12

这肯定是一个错误(请将其报告给 [email protected]),但您可以通过选择图形并选择“文件”>“文件”来解决该问题。从菜单中将选择另存为...(或从上下文菜单中将图形另存为...)。这会生成一个略有不同的文件,该文件似乎没有表现出我们从 Export[] 中观察到的不良行为。

Surely this is a bug (please report it to [email protected]), but you can work around the problem by selecting the graphic and choosing File > Save Selection As... from the menu (or Save Graphic As... from the contextual menu). This produces a slightly different file that doesn't appear to exhibit the undesirable behavior we observe from Export[].

温暖的光 2024-11-11 18:59:12

这些有问题的文件以及包含它们的 LaTeX PDF 可以通过 Adob​​e Reader 10.1.2 正确打印。如果您可以安装和使用 450MB PDF 阅读器的话。

我在 Mac OS X 10.7.2 上使用 Mathematica 8.0.4.0 重现了该问题(导致我提出这个问题)。 Wolfram 建议了像 Rasterize 这样蹩脚的解决方法,并告诉我

我们的开发人员已解决此问题,Mathematica 的未来版本中将包含修复程序。

These problematic files, and LaTeX PDFs that include them, can be properly printed by Adobe Reader 10.1.2. That's if you're okay with installing and using a 450MB PDF reader.

I reproduced the problem (leading me to this question) with Mathematica 8.0.4.0 on Mac OS X 10.7.2. Wolfram suggested lame workarounds like Rasterize and told me

This issue has been addressed by our developers, and a fix will be included in a future version of Mathematica.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文