Пример #1
0
 public void Context_Url_Rect_Info()
 {
     using (var url = new NSUrl(filename))
         using (var ctx = new CGContextPDF(url, new CGRect(0, 0, 1000, 1000), PDFInfoTest.GetInfo())) {
             ctx.AddDestination("monkey", CGPoint.Empty);
             ctx.Close();
         }
 }
Пример #2
0
 public void Context_Url()
 {
     using (var url = new NSUrl(filename))
         using (var ctx = new CGContextPDF(url)) {
             ctx.BeginPage(PDFInfoTest.GetInfo());
             ctx.SetUrl(url, CGRect.Empty);
             ctx.EndPage();
         }
 }
Пример #3
0
 public void Context_Tag()
 {
     TestRuntime.AssertXcodeVersion(11, 0);
     using (var d = new NSDictionary())
         using (var url = new NSUrl(filename))
             using (var ctx = new CGContextPDF(url)) {
                 ctx.BeginPage(PDFInfoTest.GetInfo());
                 ctx.BeginTag(CGPdfTagType.Header, (NSDictionary)null);
                 ctx.EndTag();
                 ctx.BeginTag(CGPdfTagType.Caption, d);
                 ctx.SetUrl(url, CGRect.Empty);
                 ctx.EndTag();
                 ctx.EndPage();
             }
 }
Пример #4
0
 public void Context_Tag_Strong()
 {
     TestRuntime.AssertXcodeVersion(11, 0);
     using (var url = new NSUrl(filename))
         using (var ctx = new CGContextPDF(url)) {
             var tp = new CGPdfTagProperties()
             {
                 ActualText      = "ActualText",
                 AlternativeText = "AlternativeText",
                 TitleText       = "TitleText",
                 LanguageText    = "LanguageText",
             };
             ctx.BeginPage(PDFInfoTest.GetInfo());
             ctx.BeginTag(CGPdfTagType.Header, tp);
             ctx.EndTag();
             ctx.BeginTag(CGPdfTagType.Caption, (CGPdfTagProperties)null);
             ctx.SetUrl(url, CGRect.Empty);
             ctx.EndTag();
             ctx.EndPage();
         }
 }