gpt4 book ai didi

ImageMagick - 抑制警告消息

转载 作者:行者123 更新时间:2023-12-04 18:18:57 25 4
gpt4 key购买 nike

我使用以下内容来获取 PDF 文档中的总页数:

identify -format %n test.pdf

然后,我删除所有非数字字符以从响应中获取单个整数。

偶尔会产生以下错误,这会导致上述生成错误的页数,因为它们是与响应中的页数无关的其他数字。

   **** Warning: Fonts with Subtype = /TrueType should be embedded.
The following fonts were not embedded:
Arial
Arial,Bold
Arial,Italic
Times New Roman

**** This file had errors that were repaired or ignored.
**** The file was produced by:
**** >>>> Microsoft« Office Word 2007 <<<<
**** Please notify the author of the software that produced this
**** file that it does not conform to Adobe's published PDF
**** specification.

9

“9”是文档中的页数。

如何抑制警告消息,我已尝试使用“-quiet”标志,但消息仍然产生。

最佳答案

来自identify的手册页:

-quiet suppress all warning messages

因此,为了抑制警告消息,您的命令应如下所示:

identify -quiet -format %n test.pdf

关于ImageMagick - 抑制警告消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11103640/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com