Beispiel #1
0
        public virtual void RemoteGoToRIllegalDestinationTest()
        {
            String      outFile  = destinationFolder + "remoteGoToDestinationTest01.pdf";
            PdfDocument document = new PdfDocument(new PdfWriter(outFile));

            document.AddNewPage();
            document.AddNewPage();
            try {
                PdfAction.CreateGoToR(new PdfStringFS("Some fake destination"), PdfExplicitDestination.CreateFitB(document
                                                                                                                  .GetPage(1)));
                NUnit.Framework.Assert.Fail("Exception not thrown");
            }
            catch (ArgumentException e) {
                NUnit.Framework.Assert.AreEqual("Explicit destinations shall specify page number in remote go-to actions instead of page dictionary"
                                                , e.Message);
            }
            document.Close();
        }