From d018d69aa36218589f48508b13eb57c73746cffc Mon Sep 17 00:00:00 2001 From: ilja Date: Mon, 17 Feb 2025 10:59:40 +0100 Subject: [PATCH] creates catalog.names earlier for attached files --- pdf/lib/src/pdf/obj/catalog.dart | 2 -- pdf/lib/src/pdf/obj/pdfa/pdfa_attached_files.dart | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/pdf/lib/src/pdf/obj/catalog.dart b/pdf/lib/src/pdf/obj/catalog.dart index 3d4ee336..a30526e2 100644 --- a/pdf/lib/src/pdf/obj/catalog.dart +++ b/pdf/lib/src/pdf/obj/catalog.dart @@ -98,8 +98,6 @@ class PdfCatalog extends PdfObject { } if (attached != null && attached!.isNotEmpty) { - //params['/Names'] = attached!.catalogNames(); - names ??= PdfNames(pdfDocument); names!.params.merge(attached!.catalogNames()); params['/AF'] = attached!.catalogAF(); } diff --git a/pdf/lib/src/pdf/obj/pdfa/pdfa_attached_files.dart b/pdf/lib/src/pdf/obj/pdfa/pdfa_attached_files.dart index d69d58d2..25405b60 100644 --- a/pdf/lib/src/pdf/obj/pdfa/pdfa_attached_files.dart +++ b/pdf/lib/src/pdf/obj/pdfa/pdfa_attached_files.dart @@ -36,6 +36,7 @@ class PdfaAttachedFiles { pdfDocument, _files, ); + pdfDocument.pdfNames; pdfDocument.catalog.attached = this; }