0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

rex0220 印刷屋プラグイン テーブル複数ページ

Last updated at Posted at 2025-02-27

rex0220 印刷屋プラグインで、テーブルから複数ページを作成する例です。

概要

テーブルから複数ページの PDF を作成してみます。
テーブル内の画像データも表示します。

  • プレビュー画面

2025-02-27_17h30_43.png

  • プレビュー画面 1-2 枚目

2025-02-27_17h31_23.png

  • 作成した PDF イメージ

2025-02-27_17h34_17.png

  • 元のテーブル

2025-02-27_17h35_37.png

印刷屋プラグイン設定

TABLE_HTML 関数で、テーブルから複数ページを作成します。
1ページに表示するテーブル行数を指定すると、ページ制御ができます。
画像は、IMGSRC 関数で添付ファイル項目の fileKey を取得し、印刷屋プラグインで img データに変換します。

2025-02-27_17h40_36.png

2025-02-27_17h41_13.png

共通CSSの pcraft-table-table クラスを利用し、それに個別のCSSを指定します。

.row-no,
.value-image {
  text-align: center;
}
.pcraft-table-td-value img {
  width:150px;
}

TABLE_HTMLで指定した項目は、項目の設定に従ってカンマ区切り等の書式を適用します。
独自の書式や計算結果を表示したい場合は、ARRAY関数で、項目タイトル、値、クラス名を指定してください。

TABLE_HTML(テーブル,
  OPT("title","時計","pagination","Y"),
  OPT("perPage","5"),
  ARRAY("#",ROWNO(テーブル)+1,"row-no"),
  名称,
  ARRAY("画像", IMGSRC(添付ファイル,0,"img"), "value-image")
)
0
0
0

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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?