<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>digital matter &#187; PDF</title>
	<atom:link href="http://blog.loadlimits.info/tag/pdf/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.loadlimits.info</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 06 Feb 2012 13:27:58 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>ImageMagickのPDF変換用gsコマンドを差し替える</title>
		<link>http://blog.loadlimits.info/2010/04/imagemagick%e3%81%aepdf%e5%a4%89%e6%8f%9b%e7%94%a8gs%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e3%82%92%e5%b7%ae%e3%81%97%e6%9b%bf%e3%81%88%e3%82%8b/</link>
		<comments>http://blog.loadlimits.info/2010/04/imagemagick%e3%81%aepdf%e5%a4%89%e6%8f%9b%e7%94%a8gs%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e3%82%92%e5%b7%ae%e3%81%97%e6%9b%bf%e3%81%88%e3%82%8b/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 06:19:36 +0000</pubDate>
		<dc:creator>hotpi</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[解決]]></category>
		<category><![CDATA[ImageMagick]]></category>
		<category><![CDATA[PDF]]></category>

		<guid isPermaLink="false">http://blog.loadlimits.info/2010/04/imagemagick%e3%81%aepdf%e5%a4%89%e6%8f%9b%e7%94%a8gs%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e3%82%92%e5%b7%ae%e3%81%97%e6%9b%bf%e3%81%88%e3%82%8b/</guid>
		<description><![CDATA[例によってRedHat EL4にて、yumでconvertを入れたものの、バージョンが6.4.6と古く、Powerpointで作成したPDFがエラーになる。 エラー内容はこんな感じ。 $ convert -channel RGB ./test.pdf ./test.jpg **** This file has a corrupted %%EOF marker, or garbage after the %%EOF. **** The file was produced by Microsoft? PowerPoint? 2010: **** please notify the author of this software **** that the file does not conform to Adobe's published PDF **** specification. Processing of the [...]]]></description>
			<content:encoded><![CDATA[<p>例によってRedHat EL4にて、yumでconvertを入れたものの、バージョンが6.4.6と古く、Powerpointで作成したPDFがエラーになる。</p>
<p>エラー内容はこんな感じ。</p>
<div style="padding-bottom: 0px;margin: 0px;padding-left: 0px;padding-right: 0px;float: none;padding-top: 0px" class="wlWriterEditableSmartContent">
<pre>$ convert -channel RGB ./test.pdf ./test.jpg

   **** This file has a corrupted %%EOF marker, or garbage after the %%EOF.
   **** The file was produced by Microsoft? PowerPoint? 2010:
   **** please notify the author of this software
   **** that the file does not conform to Adobe's published PDF
   **** specification.  Processing of the file will continue normally.

Error: /rangecheck in --.buildshading2--
Operand stack:
   --dict:8/8(L)--   --dict:3/5(L)--   --nostringval--   false   --nostringval--   --nostringval--   --nostringval--   --nostringval--   --dict:3/4(L)--   --nostringval--   --dict:5/5(L)--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1   3   %oparray_pop   1   3   %oparray_pop   1   3   %oparray_pop   --nostringval--   2   1   2   --nostringval--   %for_pos_int_continue   --nostringval--   --nostringval--   --nostringval--   --nostringval--   1   %stopped_push   --nostringval--   --nostringval--   --nostringval--   1   %stopped_push   --nostringval--   --nostringval--   %array_continue   --nostringval--   false   1   %stopped_push   --nostringval--   %loop_continue   --nostringval--   --nostringval--   --nostringval--   3   10   %oparray_pop   --nostringval--   --nostringval--   false   1   %stopped_push   --nostringval--   --nostringval--
Dictionary stack:
   --dict:1069/1123(ro)(G)--   --dict:0/20(G)--   --dict:93/200(L)--   --dict:93/200(L)--   --dict:97/127(ro)(G)--   --dict:229/230(ro)(G)--   --dict:19/24(L)--   --dict:4/6(L)--   --dict:19/20(L)--   --dict:3/5(L)--
Current allocation mode is local
GNU Ghostscript 7.07: Unrecoverable error, exit code 1
convert: Postscript delegate failed `./test.pdf': No such file or directory @ pdf.c/ReadPDFImage/612.
convert: missing an image filename `./test.jpg' @ convert.c/ConvertImageCommand/2710.
</pre>
</div>
<p>で、見る限り、GhostScriptのエラーのようなので、gsのバージョンを調べてみると、</p>
<p>$ gs -v<br />
  <br />GNU Ghostscript 7.07 (2003-05-17) </p>
<p>Copyright (C) 2003 artofcode LLC, Benicia, CA.&#160; All rights reserved.</p>
<p>というわけで、GhostScriptのコマンドの最新版を別にインストールして対応。その際、元のgsコマンドを入れ替えるわけにいかなかったので、ImageMagickから読み込むgsコマンドのファイルだけを指定できないかと思ったら、ImageMagickはXMLでコマンドを定義していたんですね。</p>
<p><a href="http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&amp;t=14213" target="_blank">ImageMagick • View topic &#8211; manually set delegate path to gs (ghostscript)</a></p>
<p>各種コマンドのオプションがImageMagick-6.4.6/config/delegates.xmlに記述されています。</p>
<p>gsコマンドの箇所を絶対パスに書き換えてやるだけで完了。便利。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loadlimits.info/2010/04/imagemagick%e3%81%aepdf%e5%a4%89%e6%8f%9b%e7%94%a8gs%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e3%82%92%e5%b7%ae%e3%81%97%e6%9b%bf%e3%81%88%e3%82%8b/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

