I’m wonderring if aspose can support merge the following file format into one pdf instead of convert to pdf first and then merge to one pdf.
Hi,
Thanks for the quick answer, I also want to know that if aspose can control or set the output PDF file size to make sure its size less than a certain value, e.g. 2M
Hi,
Thanks codewarior, the pdf optimization code is really helpful. I also want to know if the aspose.image can support the feature that set the image convert rate to optimize the final picture size to convert to pdf. For example, if the image size is 5M, if I can convert or limit its size to 3M after convert to PDF, it seems the same requiremnt as word convert, but it’s for the image and only for png,jpg, jpeg,bmp, is it possible to do that during convert image to pdf or merge multiple image to one pdf?
Hi,
PngOptions
class that has an int type CompressionLevel
property. This property accepts a value from 0 to 9 where 9 is the maximum compression.//Load an image from file (or stream)
using
(Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(input))
{
//Loop over possible CompressionLevel range
for
(
int
i = 0; i <= 9; i++)
{
//Create an instance of PngOptions for each resultant PNG
PngOptions options =
new
PngOptions();
//Set CompressionLevel
options.CompressionLevel = i;
//Save result on disk (or stream)
image.Save(i +
“.png”
, options);
}
}
Thanks codewarior, we have png,jpg,jpeg,bmp, aspose.imaging supports all of those formats?
Hi,linzi201719811001:
Thanks codewarior, we have png,jpg,jpeg,bmp, aspose.imaging supports all of those formats?
Now concerning to this requirement, as per JPEG format standard, when we compress the image, the quality is decreased.linzi201719811001:
For the compressionlevel,if it can ensure lossless image compression to make sure the image no quality changes or loss.
Can you please share some details regarding this method, so that we can reply accordingly. If possible, please share the code snippet which you are using.linzi201719811001:
I note that image.replace method has a quality parameter, what does it mean,the scope is 0~100? if I set its value as 10, the image quality will become worse?