From ba7371b2e105b167c4ca7b2eb3aa94968df2c7ef Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Sun, 13 Apr 2025 14:31:14 -0400 Subject: [PATCH] Fix location of OutputIntents (catalog, not info dict) --- pdfio-content.c | 4 ++-- pdfio-file.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pdfio-content.c b/pdfio-content.c index da313dd..856cde0 100644 --- a/pdfio-content.c +++ b/pdfio-content.c @@ -1537,7 +1537,7 @@ pdfioFileAddOutputIntent( } // Get the OutputIntents array... - if ((output_intents = pdfioDictGetArray(pdfioObjGetDict(pdf->info_obj), "OutputIntents")) != NULL) + if ((output_intents = pdfioDictGetArray(pdfioFileGetCatalog(pdf), "OutputIntents")) != NULL) { // See if we already have an intent for the given subtype... size_t i, // Looping var @@ -1561,7 +1561,7 @@ pdfioFileAddOutputIntent( if ((output_intents = pdfioArrayCreate(pdf)) == NULL) return; - pdfioDictSetArray(pdfioObjGetDict(pdf->info_obj), "OutputIntents", output_intents); + pdfioDictSetArray(pdfioFileGetCatalog(pdf), "OutputIntents", output_intents); } // Create an intent dictionary... diff --git a/pdfio-file.c b/pdfio-file.c index b6c41b4..bcb8a3a 100644 --- a/pdfio-file.c +++ b/pdfio-file.c @@ -125,7 +125,7 @@ pdfioFileClose(pdfio_file_t *pdf) // I - PDF file ret = false; // Add default OutputIntent for PDF/A CMYK printing... - pdfioFileAddOutputIntent(pdf, /*subtype*/"GTS_PDFA1", /*condition*/"CMYK", /*cond_id*/"CGATS001", /*reg_name*/NULL, /*info*/"CMYK Printing", /*profile*/pdf->cgats001_obj); + pdfioFileAddOutputIntent(pdf, /*subtype*/"GTS_PDFA1", /*condition*/"CMYK", /*cond_id*/"CGATS001", /*reg_name*/NULL, /*info*/"CMYK Printing", /*profile*/NULL); // Close and write out the last bits... if (pdfioObjClose(pdf->info_obj) && write_pages(pdf) && pdfioObjClose(pdf->root_obj) && write_trailer(pdf))