LoginSignup
29

More than 5 years have passed since last update.

複雑なPDFをテキストファイルから生成。Windows,Mac,Linuxの実行ファイルなので、どの言語でも使用可能

Last updated at Posted at 2016-01-23

pdf-by-text https://github.com/mikeshimura/pdf-by-text

複雑なPDFも作成可能です。 例えば下記のサンプルの様なものも出来ます。 

プログラムから、テキストファイルを作成し、子プロセスで、当プログラムを実行すれば、どの言語でも使用出来ます。

下記単純なレポートを作成するテキストファイルの最初の部分は下記の通りです。

各エレメントは、タブ(\t)で、区切らなければなりません。

P   mm  A4  L
F   IPAexG      14
C1  50.00   15.00   Sales Report
F   IPAexG      12
C1  240.00  20.00   page
C1  260.00  20.00   1
C1  15.00   23.00   D No
C1  30.00   23.00   Dept
C1  60.00   23.00   Order
C1  90.00   23.00   Stock
C1  120.00  23.00   Name
CR  135.00  23.00   25.00   Unit Price
CR  160.00  23.00   20.00   Qty
CR  190.00  23.00   20.00   Amount

当プログラムは、goreport https://github.com/mikeshimura/goreportの一部機能を実行ファイル形式にしたものです。

単純なレポートのサンプル
Simple1

text
pdf

中程度のレポートのサンプル
Medium1

text
pdf

複雑なレポートのサンプル
Complex1

text
pdf

Complex2

text
pdf

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
29