Beispiel #1
0
        void CheckTamarin(CGPDFDocument pdf)
        {
            Assert.True(pdf.AllowsCopying, "AllowsCopying");
            Assert.True(pdf.AllowsPrinting, "AllowsPrinting");
            Assert.False(pdf.IsEncrypted, "IsEncrypted");
            Assert.True(pdf.IsUnlocked, "IsUnlocked");
            Assert.That(pdf.Pages, Is.EqualTo((nint)3), "Pages");

            Assert.That(pdf.GetInfo().Count, Is.EqualTo(7), "GetInfo");

            if (TestRuntime.CheckXcodeVersion(9, 0))
            {
                // Merely check that the P/Invoke goes through.
                var perms = pdf.GetAccessPermissions();

                // Get and set outline
                var outline = pdf.GetOutline();
                pdf.SetOutline(outline);
            }

            if (TestRuntime.CheckXcodeVersion(10, 0))
            {
                DumpPdf(pdf);
            }
        }
Beispiel #2
0
        void CheckTamarin(CGPDFDocument pdf)
        {
            Assert.True(pdf.AllowsCopying, "AllowsCopying");
            Assert.True(pdf.AllowsPrinting, "AllowsPrinting");
            Assert.False(pdf.IsEncrypted, "IsEncrypted");
            Assert.True(pdf.IsUnlocked, "IsUnlocked");
            Assert.That(pdf.Pages, Is.EqualTo((nint)3), "Pages");

            Assert.That(pdf.GetInfo().Count, Is.EqualTo(7), "GetInfo");
        }