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

Aperta
#1,553 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
javascript, node.js
Ambito
tooling

Direzione di ricerca

La issue non indica file, test o punti di ingresso. Inizia tracciando come le pagine create automaticamente gestiscono l’overflow del contenuto e come vengono configurati i margini delle pagine create manualmente; il lavoro sarebbe completato quando saranno supportati margini distinti per le pagine dispari e pari create dall’overflow, senza misurare preventivamente tutte le stringhe.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
JavaScript
Stelle
10.7k
Fork
1.2k
Merge medio
21h 41m
PR unite (30g)
27

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di foliojs/pdfkit

Tutte le issue di foliojs/pdfkit

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.