トップ回答者
SQL server2000のreporting ServicesからのPDF作成について

質問
-
初めて質問します。
失礼な発言があればお許しください。
まず、現在の状況なのですが
SQL server2000のreporting Servicesを使用してPDFを作成しています。
作成したPDFをVISTAで開いたときに、数字以外の文字が全て文字化けするという現象に遭遇しました。
いろいろ調べて結果、下記のサイトを発見し状況が似ていることから、これが原因だろうと思うのですが
解決方法が分からず困っています。
サイト
http://blog.antenna.co.jp/PDFTool/archives/2007/05/window_vistapdf.html
解決方法としては
(1)フォントを埋め込むか
(2)CIDではなく、文字コードを使うか
(3)ToUnicodeCMAPを用意する
とのことなんですが、reporting Servicesではどの方法がとれるのでしょうか?
良い知恵があれば教えてください。
それではよろしくお願いします。
回答
-
私の会社でも同じ現象が起きています。
Vistaは使用していませんが、XP、2003にVista用のフォントの更新プログラムをインストールすると同様の現象が発生しています。
まず、
1)フォントの埋め込み
に関してはSQLServer2000/2005いずれのReporting Services でもサポートされていません。
2)文字コードの使用
に関してはVisual Studioでプロパティを見る限りはそんなことを指定できなさそう。
レポートファイルの中では
<FontFamily>MS PGothic</FontFamily>
として記述されているので、CIDを使用しているかは不明だが、少なくとも開発者側で何とかできるものではない
3)ToUnicodeCMAPを用意する
に関してはできるとしてもReporting Service側で対応してもらう必要があるのじゃないかと思う。
よって、私は半ばあきらめています。
幸運にもVistaを使用していないので、修正パッチをアンインストールして回避しようと考えています。
-
私も同じ現象に悩んでいます。
確かにVista用フォント更新プログラムをアンインストールすると回避はできるのですが、
今後、Vistaで読まれる可能性もあるのでなんとかしなければなりません。
フォントはどちらかしか使えないので(両立できない)どっちかに対応したらもう一方は×です。
SQLServer2005サービスパックででも
フォント埋め込みに対応してくれてないか期待しましたが、それもだめなようです。
回避策として考えたのは、
・各クライアントで、Excel出力して市販のPDF変換ソフト(フォント埋め込み対応のもの)でPDF化
・PDFをあきらめて画像で出力
どちらも根本解決になってません・・・
-
-
今のところ 2008 でも同じようです。
SQL Server 2008 Books Online (October 2007) Exporting to a PDF file
http://technet.microsoft.com/en-us/library/ms159713(SQL.100).aspxThe PDF rendering extension does not embed fonts. Fonts that are used in the report must be installed on the report server and on the client computers used to view the report.
When the report server generates a report in PDF format, it uses the information stored in the font referenced by the report to measure and create character mappings within the PDF file. If the referenced font is not installed on the report server, the resulting PDF file might not contain the correct mappings and might not display correctly when viewed. In addition, the computer that is used to view the report must also have the correct font installed for the report to display correctly.
Before deploying the report on a production server, you should test the PDF rendering output on client computers to verify that the report renders correctly. Do not rely on viewing the report in Preview or rendering in HTML because GDI font substitution in those formats behaves differently than PDF. If there are Unicode Glyphs missing on the server, you may see characters replaced with a question mark (?). If there is a font missing on the client, you may see characters replaced with boxes (□).
The PDF rendering extension supports ANSI characters and can translate Unicode characters from Japanese, Korean, Traditional Chinese, Simplified Chinese, Cyrillic, Hebrew, and Arabic. The PDF rendering extension does not support 4-byte Unicode characters such as those found in extended Chinese character sets. Any other Unicode characters are mapped to a "?". Because fonts are not embedded, a font that contains the appropriate glyphs must be specified and available on the client computer.
しかし、2005/2008 では直そうとしているようです。
Complex scripts in PDF
http://blogs.msdn.com/donovans/archive/2007/10/24/complex-scripts-in-pdf.aspxI am working on a fix for both our SQL Server 2005 and upcoming SQL Server 2008 PDF renderers.
すべての返信
-
私の会社でも同じ現象が起きています。
Vistaは使用していませんが、XP、2003にVista用のフォントの更新プログラムをインストールすると同様の現象が発生しています。
まず、
1)フォントの埋め込み
に関してはSQLServer2000/2005いずれのReporting Services でもサポートされていません。
2)文字コードの使用
に関してはVisual Studioでプロパティを見る限りはそんなことを指定できなさそう。
レポートファイルの中では
<FontFamily>MS PGothic</FontFamily>
として記述されているので、CIDを使用しているかは不明だが、少なくとも開発者側で何とかできるものではない
3)ToUnicodeCMAPを用意する
に関してはできるとしてもReporting Service側で対応してもらう必要があるのじゃないかと思う。
よって、私は半ばあきらめています。
幸運にもVistaを使用していないので、修正パッチをアンインストールして回避しようと考えています。
-
私も同じ現象に悩んでいます。
確かにVista用フォント更新プログラムをアンインストールすると回避はできるのですが、
今後、Vistaで読まれる可能性もあるのでなんとかしなければなりません。
フォントはどちらかしか使えないので(両立できない)どっちかに対応したらもう一方は×です。
SQLServer2005サービスパックででも
フォント埋め込みに対応してくれてないか期待しましたが、それもだめなようです。
回避策として考えたのは、
・各クライアントで、Excel出力して市販のPDF変換ソフト(フォント埋め込み対応のもの)でPDF化
・PDFをあきらめて画像で出力
どちらも根本解決になってません・・・
-
-
今のところ 2008 でも同じようです。
SQL Server 2008 Books Online (October 2007) Exporting to a PDF file
http://technet.microsoft.com/en-us/library/ms159713(SQL.100).aspxThe PDF rendering extension does not embed fonts. Fonts that are used in the report must be installed on the report server and on the client computers used to view the report.
When the report server generates a report in PDF format, it uses the information stored in the font referenced by the report to measure and create character mappings within the PDF file. If the referenced font is not installed on the report server, the resulting PDF file might not contain the correct mappings and might not display correctly when viewed. In addition, the computer that is used to view the report must also have the correct font installed for the report to display correctly.
Before deploying the report on a production server, you should test the PDF rendering output on client computers to verify that the report renders correctly. Do not rely on viewing the report in Preview or rendering in HTML because GDI font substitution in those formats behaves differently than PDF. If there are Unicode Glyphs missing on the server, you may see characters replaced with a question mark (?). If there is a font missing on the client, you may see characters replaced with boxes (□).
The PDF rendering extension supports ANSI characters and can translate Unicode characters from Japanese, Korean, Traditional Chinese, Simplified Chinese, Cyrillic, Hebrew, and Arabic. The PDF rendering extension does not support 4-byte Unicode characters such as those found in extended Chinese character sets. Any other Unicode characters are mapped to a "?". Because fonts are not embedded, a font that contains the appropriate glyphs must be specified and available on the client computer.
しかし、2005/2008 では直そうとしているようです。
Complex scripts in PDF
http://blogs.msdn.com/donovans/archive/2007/10/24/complex-scripts-in-pdf.aspxI am working on a fix for both our SQL Server 2005 and upcoming SQL Server 2008 PDF renderers.
-
こんにちは、フォーラムオペレーターの鈴木裕子です
こちらのスレッドにご投稿いただいた皆様、大変貴重な情報をありがとうございました!
こちらの情報を多くの方に活用していただきたいと思い、勝手ながら私の方で回答チェックを付けさせていただきました。
takahashi_shinya さんはチェックの解除ができますので、
不適切と思われた場合は、遠慮なく解除いただければと思います。
Jermain さんがご投稿くださっていた、TechNetの情報の日本語版が公開されていましたので、
ご紹介させていただきますね。
SQL Server 2008 オンライン ブック (2008 年 8 月)PDF ファイルへのエクスポートhttp://technet.microsoft.com/ja-jp/library/ms159713.aspx
これからもForumをご活用ください!
それでは。