Re: [Podofo-users] Embedded Files: Exception ePdfError_ChangeOnImmutable

2024-06-20 Thread zyx via Podofo-users
On Thu, 2024-06-20 at 09:44 +0200, Christian Sakowski wrote: > PoDoFo::PdfNamesTree* names = doc->GetNamesTree(true); > PoDoFo::PdfFileSpec pEmbeddedFile(fileName, true, doc, true); > names->AddValue("EmbeddedFiles", fileName, > *pEmbeddedFile.GetObject()); > > But i got an exception (in line 2 fr

[Podofo-users] Embedded Files: Exception ePdfError_ChangeOnImmutable

2024-06-20 Thread Christian Sakowski
Hi, i create a new PDF document (with some pages) and i want to attach a XML file to the PDF document. My code: PoDoFo::PdfNamesTree* names = doc->GetNamesTree(true); PoDoFo::PdfFileSpec pEmbeddedFile(fileName, true, doc, true); names->AddValue("EmbeddedFiles", fileName, *pEmbeddedFile.GetObject