Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

iText Vorlagen erstellen

Empfohlene Antworten

Veröffentlicht

Guten tag,

Also ich möchte mit Daten aus meinem Programm PDF-Dokumente erstellen.

Die Dokumente sollen aber Firmenlogo und Signaturen am Kopf und Fuß der Seite haben.

Also dachte ich mir ich male Grafiken usw auf das Papier und beginne dann ab einer bestimmten Zeile den eigentlichen Inhalt aufzuschreiben.

Da hab ich jetzt erstmal ein Problem, dass ich am Fuß der Seite die Signatur nicht ordentlich hinbekomme.

Ich hab das mal folgendermaßen probiert:


String[][] signatur = loadSignatur();


            PdfContentByte cb = writer.getDirectContent();


            Font font = new Font();

            font.setSize(10);

            ColumnText ct = new ColumnText(cb);

            ct.setSimpleColumn(document.left()+20, 20, document.left()+170, 115, 15, Element.ALIGN_LEFT);

            for(int i = 0; i < 6; i++)

            {

            	ct.addText(new Paragraph(signatur[0][i], font));

            }

            ct.go();

Das ColumnText erstellt jetz Zeilenumbrüche wie sie mir absolut nicht gefallen. Statt dessen sollte eigentlich jedes Feld von signatur[][] in eine eigene Zeile geschrieben werden. Kann ich die automatischen Zeilenumbrüche ausstellen bzw. ohne ColumnText arbeiten und Paragraphen an bestimmte Koordinaten schreiben und wie?

Außerdem tritt jetz noch das Problem auf, dass wenn der eigentliche Inhalt zu groß wird, der eigentliche Inhalt in die Signatur rutscht, könnte man also so eine Art Vorlage erstellen, die Logo und Signatur in das PDF schreibt und den eigentlichen Inhalt nur zwischen bestimmeten y-Koordinaten zulässt und wenn der Inhalt zu viel ist automatisch eine weitere Seite mit der Vorlage einrichtet?

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.