In the following example I am loading an pdf and then saving it. The original pdf on disc is 50KB but after saving it with Aspose the size increases to 83KB.
public void Attach(string sourcePdfFilePath, string targetPdfFilePath)
{
Document pdfDocument = new Document(sourcePdfFilePath);
if (File.Exists(targetPdfFilePath))
{
File.Delete(targetPdfFilePath);
}
pdfDocument.Save(targetPdfFilePath);
}
So the question is, why does the size increase so dramatically when I don’t do any processing? And secondly, how can I fix it? I have tried using the Optimize method:
pdfDocument.Optimize();
But it only reduces the size by 1KB or so down to 80KB.
I am using the free trial at the moment, as of my understading the watermark might add a little bit, but surely not 30KB?