Help us understand the problem. What is going on with this article?
Webシステムを作っていて、時々PDFの帳票が必要になることがあります。サーバサイドでPDF出力するツールは幾つかありますが、それらのセットアップは面倒ですし、サーバの負荷も気になるでしょう。 そこで使ってみたいのがpdfmakeです。サーバ、クライアントサイド両方に対応したPDF作成ツールです。 pdfmakeの使い方 pdfmakeではJSONを使ってPDFの形式を定義します。 スタイル設定も可能です。 より複雑なスタイルを使った例です。 段組のサンプル。 テーブルも使えます。 リスト。ネストもできます。 より本格的な形式ですね。 画像も使えます。 pdfmakeの良いところはJavaScriptによる生成なのでサーバサイドの負荷なく、かつ編集した内容をその場で反映して生成し直すこともできるということです。さらにnodeで動かすこともできるのでクライアントサイドのコードを使ってそのまま
以前から、縦幅基準に1ページまるごと収めても十分読めるほどディスプレイが大きいのであれば、PDFビューアのページ遷移は水平方向にスクロールすべきだと思ってたんですね。 画面が広いとこういうの無駄だよね。 じゃあこうすればいいんじゃね? 画面を縦にするって手もありますが、こういう風に横に並べると複数ページにまたいで確認できるのもメリット。ワイド液晶なら3ページぐらい表示できちゃうかも。 しかし… しかし既存のPDFビューアで水平方向にスクロールできるものは見当たらず、またPDFビューアを1から作るほどのスキルはないのでどうしたものか。 で、そういえばJavaScriptで実装されたPDFビューアがあったな、ということを思い出しました。 mozilla/pdf.js @ GitHub お、JavaScriptなら俺でも改造できるかも?ということで、水平方向にスクロールできるPDFビューアを作っ
PDF.js PDF.jsを使えば、PDFをそれっぽいインタフェースとともにブラウザ上で表示してしまえます。 なんでもJavaScriptでやりゃいいってもんじゃないよ、という気もしますが、面白かったのでご紹介です。 PDFを一貫して同じインタフェースで表示させたいというようなニーズにマッチしそうですが、動かないブラウザもあるみたい。 世界は広いということを認識させられるライブラリですね 関連エントリ HTML5で美麗なページめくり効果が作れるJSライブラリ「turn.js」 ド派手なビジュアリゼーションを実現できるJSライブラリ「Toxiclibs.js」 ヒートマップが描画できるHTML5 canvasベースのJSライブラリ「heatmap.js」 OpenOffice等の文書をWEBで表示するJSライブラリ「WebODF」
はてなグループの終了日を2020年1月31日(金)に決定しました 以下のエントリの通り、今年末を目処にはてなグループを終了予定である旨をお知らせしておりました。 2019年末を目処に、はてなグループの提供を終了する予定です - はてなグループ日記 このたび、正式に終了日を決定いたしましたので、以下の通りご確認ください。 終了日: 2020年1月31日(金) エクスポート希望申請期限:2020年1月31日(金) 終了日以降は、はてなグループの閲覧および投稿は行えません。日記のエクスポートが必要な方は以下の記事にしたがって手続きをしてください。 はてなグループに投稿された日記データのエクスポートについて - はてなグループ日記 ご利用のみなさまにはご迷惑をおかけいたしますが、どうぞよろしくお願いいたします。 2020-06-25 追記 はてなグループ日記のエクスポートデータは2020年2月28
「Adobe Illustrator CS3 + JavaScript サンプル集」に収録されているスクリプトの一覧です。 「Adobe Illustrator CS3 + JavaScript サンプル集」は紙の書籍ではなくデジコンカートで販売中です。 基本的にはMacOS X版のIllustrator CS3を基準にしていますが、ほとんどのサンプルはWindows版のIllustrator CS3でも動作します。サンプルコード (jsxファイル) もダウンロードPDFと一緒に収録されています。 また、CS4でも一部のサンプル (GUIの一部) を除いて動作します。 このPDFは初心者向けではありません。中級者〜上級者向けで、なおかつ自動処理に興味がある方が対象です。 以下のリンクをクリックすると実際のPDFの一部を見ることができます。PDFなのでAdobe Reader (旧Acrob
まさにあのAAが似合う、そんな代物だ。Webサイトでコネクション数を極力減らすための技術として、DataスキームURIが知られている。これはhttpからはじまるようなURLの代わりに、data:からはじまる書き方で直接データをbase64で表記して流し込んでしまう手法だ。 できると思う? 対応しているブラウザは限られるが、仕様自体はRFC2397として定義されているのでIE7などでも利用できるようになっている。これを使えば画像のみならず、こんなことができてしまう。 今回紹介するオープンソース・ソフトウェアはjsPDF、JavaScriptで生成するPDFライブラリだ。 まさに無茶だ。jsPDFはJavaScriptだけでPDFを生成してしまう試みだ。何をばかなことを、とお思いだろうか。であれば実際に試してみると良い。日本語は残念ながら使えないが、英語であればちゃんとしたPDFが生成されるこ
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く