Hello,
I use PdfFileSpec object to embed a XML file into a PDF in the following
manner :
PdfNamesTree *names = GetNamesTree( true );
PdfFileSpec pEmbeddedFile( FilePath, true, Doc, true );
names->AddValue( "EmbeddedFiles", FilePath.BaseName(),
*pEmbeddedFile.GetObject() );
It seems that two objets are created, one of them is not referenced
except by the Xref table.
The root object
7 0 obj
<<
/Type /Catalog
/Lang (fr-FR)
/Names 9 0 R
/OpenAction [ 1 0 R /XYZ null null 0 ]
/Pages 4 0 R
>>
endobj
9 0 obj
<<
/EmbeddedFiles 12 0 R
>>
endobj
12 0 obj
<<
/Kids [ 13 0 R ]
>>
endobj
13 0 obj
<<
/Limits [ (test.xml) (test.xml) ]
/Names [ (test.xml) <<
/Type /Filespec
/EF <<
/F 11 0 R
>>
/F (test2Exml)
/UF (? t e s t . x m l)
>> ]
>>
endobj
11 0 obj
<<
/Type /EmbeddedFile
/Filter /FlateDecode
/Length 3401
/Params <<
/Size 17253
>>
>>
stream
..........
endstream
endobj
and the following not referenced object
10 0 obj
<<
/Type /Filespec
/EF <<
/F 11 0 R
>>
/F (test2Exml)
/UF (? t e s t . x m l)
>>
endobj
Is there a reason for this ?
Kind regards,
Patrice.
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users