Question
Is it possible to export PDF with metadata?
Answer
Yes, to do so, please use the DocumentContentInfo object:
//0. Create and process the document
FREngine.FRDocument document = engineLoader.Engine.CreateFRDocumentFromImage(@"D:\image.jpg");
document.Process();
//1. Write the necessary metadata to the corresponding DocumentContentInfo property
document.DocumentContentInfo.Producer = "The White Queen";
//2. Create PDFExportParams
FREngine.PDFExportParams pdfExportParams = engineLoader.Engine.CreatePDFExportParams();
//3. Set the corresponding property of MetaDataWritingParams object to TRUE
pdfExportParams.PDFFeatures.MetaDataWritingParams.WriteProducer = true;
//4. Perform export with these settings
document.Export(@"D:\export.pdf", FREngine.FileExportFormatEnum.FEF_PDF, pdfExportParams);
Comments
0 comments
Please sign in to leave a comment.