change: selects now use inputmanager
fix: bad exit logic feat: field rename now supports renaming things with multiple widgets
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { log } from "./logfile.ts";
|
||||
import { join } from "@std/path";
|
||||
|
||||
export async function getAsciiArt(art: string) {
|
||||
|
@@ -9,7 +9,7 @@ logFile.truncateSync(0);
|
||||
|
||||
export function log(message: any) {
|
||||
if (typeof message === "object") {
|
||||
message = JSON.stringify(message);
|
||||
message = Deno.inspect(message);
|
||||
}
|
||||
logFile.writeSync(new TextEncoder().encode(message + "\n"));
|
||||
}
|
||||
|
@@ -15,10 +15,10 @@ export async function loadPdf(path: string) {
|
||||
export async function savePdf(doc: PDFDocument, path: string) {
|
||||
doc.getForm().getFields().forEach((field) => {
|
||||
if (field instanceof PDFTextField) {
|
||||
field.disableRichFormatting();
|
||||
field.disableRichFormatting?.();
|
||||
}
|
||||
});
|
||||
const pdfBytes = await doc.save();
|
||||
const pdfBytes = await doc.save({ updateFieldAppearances: true });
|
||||
if (Deno.env.get("DRYRUN") || path.includes("dryrun")) return;
|
||||
await Deno.writeFile(path, pdfBytes);
|
||||
}
|
||||
|
Reference in New Issue
Block a user