Exemplo n.º 1
0
            public void ShouldSetTheCorrectDefine()
            {
                var defines = new PdfReadDefines()
                {
                    UseTrimBox = false,
                };

                using (var image = new MagickImage())
                {
                    image.Settings.SetDefines(defines);

                    Assert.AreEqual("false", image.Settings.GetDefine(MagickFormat.Pdf, "use-trimbox"));
                }
            }
Exemplo n.º 2
0
            public void ShouldSetTheCorrectDefine()
            {
                var defines = new PdfReadDefines()
                {
                    UseCropBox = true,
                };

                using (var image = new MagickImage())
                {
                    image.Settings.SetDefines(defines);

                    Assert.AreEqual("True", image.Settings.GetDefine(MagickFormat.Pdf, "use-cropbox"));
                }
            }
Exemplo n.º 3
0
        public void Test_UseCropBox_UseTrimBox()
        {
            PdfReadDefines defines = new PdfReadDefines()
            {
                UseCropBox = true,
                UseTrimBox = false,
            };

            using (IMagickImage image = new MagickImage())
            {
                image.Settings.SetDefines(defines);

                Assert.AreEqual("True", image.Settings.GetDefine(MagickFormat.Pdf, "use-cropbox"));
                Assert.AreEqual("False", image.Settings.GetDefine(MagickFormat.Pdf, "use-trimbox"));
            }
        }