Hello, I am creating a word document with images. When saving to a file, its size is 1Mb.
If I convert a document to PDF, when saving to a file, its size is 10Mb
10 times more, can this be somehow influenced? I need to reduce the file size.
string tempFileName = _dir.Path + "/pdfexample.pdf"
MemoryStream _ms = new MemoryStream();
DocIORenderer render = new DocIORenderer();
PdfDocument pdfDocument = render.ConvertToPDF(document);
render.Dispose();
document.Dispose();
pdfDocument.Save(_ms);
pdfDocument.Close();
using (FileStream _file = new FileStream(tempFileName, FileMode.Create, System.IO.FileAccess.Write)) _ms.CopyTo(_file);