Quantcast
Channel: magick Discussions Rss Feed
Viewing all articles
Browse latest Browse all 3693

New Post: Command in Magick.net

$
0
0
I am working on some new classes to make this easier. The one for PDF will be available in the next release of Magick.NET. You can then use the following code:
// You will be able to do this in the next release of Magick.NET
MagickReadSettings settings = new MagickReadSettings()
{
  Defines = new PdfReadDefines()
  {
    UseCropBox = true,
    UseTrimBox = false
  }
};

using (MagickImage image = new MagickImage("yourfile.pdf", settings))
{
}

// For now you will have to do thisusing (MagickImage image = new MagickImage())
{
  image.SetDefine(MagickFormat.Pdf, "use-cropbox", true);
  image.SetDefine(MagickFormat.Pdf, "use-trimbox", false);
  image.Read("yourfile.pdf");
}

Viewing all articles
Browse latest Browse all 3693

Trending Articles