We are utilizing the Aspose.PDF grayscale conversion process described here:
The grayscale conversion itself works as expected, but the resulting files are roughly 30x larger (ie, a 500 KB file turns into a 15 MB file).
Our files consist of a Word document that is saved as a PDF within Word itself, and a TIF file which is converted to PDF using Aspose. The Word PDF and the TIF PDF are then merged and saved into one PDF using Aspose. At this point, the merged PDF has the expected/appropriate file size. Once the grayscale operation is completed, the file size inflates significantly.
We’ve tried this operation using Aspose.PDF versions 18.6.1 and 21.4.0. Both versions exhibit the same behavior. Any advice would be appreciated!
Can you please provide your sample source file(s) and sample code snippet that you are using for conversion. We will test the scenario in our environment and address it accordingly.
Thanks for the reply. I will try to dummy up some files that I can attach here. Our “real” documents contain PHI and other sensitive information, so I can’t attach them as-is.
Sorry for the late reply. Please see attached, and also our grayscale conversion method below. When I execute this code against the attached PDF, the file size goes from 64 KB to 1,975 KB.
> public static void convertPDFGrayScale(string license, string inputPDF, bool createNewFile, out bool conversionResult, out string conversionMsg)
We were able to replicate the issue in our environment using 21.5 version of the API. Therefore, we have logged an issue as PDFNET-49937 in our issue management system. We will further investigate the ticket in details and keep you posted with the status of its rectification. Please be patient and spare us some time.