Test_fa5_Final_Ver2_202401110442OOBL.zip (218.7 KB)
Hi.
Aspose.Email version 23.12.0
i want to convert PDF (with redaction) to eml/msg. i convert PDF to html and html to eml or msg.
html show correct image location, but after convert to eml or msg all redaction boxes and image are combined to one and separated with text (image to top and text to bottom)
this is my code
Aspose.Email.MailMessage Originalmessage = Aspose.Email.MailMessage.Load(OriginalEmailFilePath);
//PDF to Html
Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(SourcePDFFilePath);
string OutPutFilePathHtml = Path.Combine(FileDirectory, OutputFileName + “.html”);
{
Aspose.Pdf.HtmlSaveOptions HtmlSaveoption = new Aspose.Pdf.HtmlSaveOptions()
{
//ConvertMarkedContentToLayers= false,
//CompressSvgGraphicsIfAny = true,
//FlowLayoutParagraphFullWidth = true,
//UseZOrder = true,
RasterImagesSavingMode = Aspose.Pdf.HtmlSaveOptions.RasterImagesSavingModes.AsEmbeddedPartsOfPngPageBackground,
PartsEmbeddingMode = Aspose.Pdf.HtmlSaveOptions.PartsEmbeddingModes.EmbedAllIntoHtml,
};
pdfDocument.Save(OutPutFilePathHtml, HtmlSaveoption);
}
//Html to Email
ResultMessage.SetHtmlBody(File.ReadAllText(OutPutFilePathHtml), true);
ResultMessage.Save(TargetFilePath, Aspose.Email.SaveOptions.DefaultMsg);
Test_fa5_Final_Ver2_202401110442OOBL.pdf (52.7 KB)
Thank you