How can I control the margins or other options of the new pages that are created automatically when content overflows?

オープン
#1,553 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
javascript, node.js
領域
tooling

調査の方向性

この issue では、ファイル、テスト、エントリーポイントが指定されていません。まず、自動的に作成されるページがコンテンツのオーバーフローをどのように処理するか、また手動で作成されるページのマージンがどのように設定されるかを追跡してください。完了条件は、すべての文字列をあらかじめ計測することなく、オーバーフローによって作成される奇数ページと偶数ページで異なるマージンをサポートすることです。

索引モデルが issue の本文から書いたものです。

説明

I am creating a pdf in which odd and even pages have different margins. I can do that by manually creating pages but when content overflows a new page is created automatically and I cannot control the margins of it.

Any suggestions? Is there a feature that allows to manipulate this?

I am thinking of a workaround in which I measure the height of the string prior to adding it to the document and then calculate the amount of pages it will stretch so that I can create those pages in advance with the required margins. However, when a lot of different strings start overflowing things start to get messy.

Any ideas about how can I achieve this? Bear in mind that I have like 200 separate strings to add to the document and some of them might span for several pages while others just a line. Furthermore, strings vary in length depending on the user data.

Thanks

主要言語
JavaScript
スター
10.7k
フォーク
1.2k
平均マージ
21時間 41分
マージ済み PR(30日)
27

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

foliojs/pdfkit のほかの issue

foliojs/pdfkit の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。