Hi there,
I am evaluating Aspose.Page for conversion of EPS to PDF. Getting it working was fairly simple.
However, the resulting PDF is huge. I believe it is not compressing any images at all within the PDF.
- Original EPS file = 48kB
- Convert and save to PDF using Ghostscript = 41kB in less than 1 second
- Convert and save to PDF using Aspose.Page = 700kB in around 5 seconds
Changing the JpegQualityLevel
of the PdfSaveOptions
passed in to PsDocument.SaveAsPDF
has no effect. I tried 0, 50, 80, 100 and all result in exactly the same output file.
I have attached a sample EPS file - just a few vectors and one image. There are no fonts/text in the EPS.
test.eps.zip (35.1 KB)
This code may not run OOTB but it’s a quick summary of my approach:
FileStream inputStream = new FileStream(inputFileName, FileMode.Open, FileAccess.Read);
PsDocument document = new PsDocument(inputStream);
PdfSaveOptions options = new PdfSaveOptions(true);
options.JpegQualityLevel = 0;
document.SaveAsPdf(outputFileName, options);
Hope you can help!
Peter