Page 1 of 1

Setting output PDF size with MagickNet

Posted: 2007-06-06T09:12:30-07:00
by davesykes
Hi,

I'm new to ImageMagick and MagickNet, but it seems a very powerful piece of software, with some features that I have been unable to find in commercial products, a big thank you to all who have been involved.

I'm using MagickNet with C# to convert Tiff images into PDF files, I need to create 2 PDFs from the one input file, one the same size, and another at 72dpi resolution, still have the same output size.

For example, with an input TIFF of 1000x1000 pixels at 300dpi
One output PDF is created as 240x240pt, which matches the 300dpi of the original,
For the second I resize the image (image.Resize) to 240x240 pixels, then save as PDF, but it still stays as 300dpi, making the PDF 58x58pt, what I want is for this PDF to be made at 72dpi, so it stays at 240x240pt.

Any one got any ideas. I did try to post this to the MagickNet forum, but was unable to register on there due to the forum being unable to connect to its mail server.

Thanks,

Dave Sykes

Re: Setting output PDF size with MagickNet

Posted: 2007-06-07T01:38:39-07:00
by davesykes
I have been doing some more investigation, and have managed to answer my own question, thought I'd post it for anyone who might have the same problem.

image.Density = new MagickNet.Image.Resolution(72.0, 72.0);

will set the resolution of the output PDF to 72dpi, exactly what I needed.

Regards,

Dave Sykes