This project has moved and is read-only. For the latest updates, please go here.

Loss of PDF Quality

Sep 5, 2016 at 11:23 AM
Edited Sep 5, 2016 at 12:12 PM
Hi,

I tried to very simply create one PDF from another PDF (I have GS 9.19 64bit installed).

However, there was a clear loss of quality. I couldn't find a PDF WriteDefine class.

Please let me know if there is a problem with my code:

using (MagickImage magickImage = new MagickImage(@"C:\users\abc\desktop\UserOrganization02.pdf"))
{
using (FileStream fs = File.Open(@"C:\users\abc\desktop\otter2.Pdf", FileMode.Create))
{
    magickImage.Write(fs, MagickFormat.Pdf);
}
}

ENVIRONMENT: Win 10 Anniversary, VS2015 SP3, GS 9.19 64 bit, ImageMagick 7.0.3.1 8bit Color AnyCpu)
Sep 5, 2016 at 12:18 PM
Magick.NET might not be the best tool to convert a PDF file to a PDF. The PDF file format is a vector format and Magick.NET only understands raster images. You can however improve the quality of the document if you specify density in the MagickReadSettings when you read the image. Setting it to 300 should be a good start.
Sep 5, 2016 at 1:06 PM
Worked - thanks.