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 印刷屋プラグイン 書式画像を背景に

Posted at

rex0220 印刷屋プラグイン 書式画像を背景にして領収書を作ってみます。
出来ないことはないが、位置合わせが面倒なので作るのが大変です。

概要

下記のような手順で、書式を取り込んで項目を配置すれば、できそうです。
結構面倒な作業なので、宛名だけ試してみました。

  • Excel で作った領収書の書式を png 画像にして、kintone の添付ファイルに入れる
  • 印刷屋プラグインのページに、背景画像として設定
  • 各項目を領収書の書式に合わせて配置(ブラウザーの開発ツール)を調整

2025-02-28_08h54_23.png

ブラウザーの開発ツールで位置調整

領収書の書式位置を基準として、項目の top, left 等を指定して表示位置を合わせます。

2025-02-28_09h03_30.png

印刷屋プラグイン設定

書式画像を背景にした div を設定し、その要素として、各項目を追加します。

2025-02-28_09h06_38.png

2025-02-28_09h07_12.png

.pcraft-back-image {
    position: relative;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
}
<div class="rex0220-pcraft-page">
    <div class="pcraft-back-image" style="background-image: url(#{&f(20250227231325D28DBAB4BF7A453EB4A2BA388F8195E9054)})">
        <div style="position: absolute; left: 30px; top: 110px; font-size: 22px;">
            ${宛名}
        </div>
    </div>
</div>
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?