Python で trml2pdf ライブラリを使用していますが、例を使用しても空の PDF ファイルが生成されます。次のように実行します: trml2pdf.py ex5.rml > out.pdf
Acrobat でファイルを開くと、空白/空です。しかし、テキスト エディターでコンテンツを分析すると、次のように表示されます。
生成された PDF:
%PDF-1.4
%“Œ‹ž ReportLab Generated PDF document http://www.reportlab.com
% 'BasicFonts': class PDFDictionary
1 0 obj
% The standard fonts dictionary
<< /F1 2 0 R
/F2 3 0 R
/F3 4 0 R >>
PDF の例:
%PDF-1.3
%“Œ‹ž ReportLab Generated PDF document http://www.reportlab.com
% 'BasicFonts': class PDFDictionary
1 0 obj
% The standard fonts dictionary
<< /F1 2 0 R
/F2 3 0 R
/F3 4 0 R
/F4 5 0 R
/F5 6 0 R >>
私は何を間違っていますか?出力に空白行が表示されるのはなぜですか?
ありがとう!
空白の PDF も返す基本的な RML を次に示します。
<!DOCTYPE document SYSTEM "rml_1_0.dtd">
<document filename="example_1.pdf">
<stylesheet>
</stylesheet>
<pageDrawing>
<drawCentredString x="4.1in" y="5.8in">
Hello World.
</drawCentredString>
</pageDrawing>
</document>