OCR SDK Knowledge Base

Article ID: 1154 | Category: Export | Type: Tips & Tricks | Last Modified: 2/15/2013

PDF Metadata


How do I edit metadata (author, subject, title, keywords, producer, or creator of the document) in a PDF file?


C# code sample

//0. Create and process the document
FREngine.FRDocument document = engineLoader.Engine.CreateFRDocumentFromImage(@"D:\image.jpg");

//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); 
404 people think this is helpful.
Was this information helpful to you?