34 lines
741 B
TypeScript
34 lines
741 B
TypeScript
import { PDFPage, PDFFont, RotationTypes } from "pdf-lib";
|
|
|
|
export function addDatumGEG(page: PDFPage, font: PDFFont) {
|
|
page.drawText("20. Juli 2022", {
|
|
x: 308,
|
|
y: page.getHeight() - 70,
|
|
size: 10,
|
|
font,
|
|
});
|
|
}
|
|
|
|
export function addAnsichtsausweisLabel(page: PDFPage, font: PDFFont) {
|
|
page.drawText("Ansichtsausweis", {
|
|
x: page.getWidth() / 2 - font.heightAtSize(112) * 2.2,
|
|
y: page.getHeight() - font.heightAtSize(112) / 2,
|
|
size: 112,
|
|
font,
|
|
rotate: {
|
|
type: RotationTypes.Degrees,
|
|
angle: -60,
|
|
},
|
|
opacity: 0.3,
|
|
});
|
|
}
|
|
|
|
|
|
export function addRegistriernummer(page: PDFPage, font: PDFFont, registriernummer: string) {
|
|
page.drawText(registriernummer, {
|
|
x: 435,
|
|
y: page.getHeight() - 113,
|
|
size: 10,
|
|
font,
|
|
});
|
|
} |