コード例 #1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            // Load the license serial number and key from the resource files
            string sn  = GetIni(NSBundle.MainBundle.PathForResource("rdk_sn", "txt"), "SN");
            string key = GetIni(NSBundle.MainBundle.PathForResource("rdk_key", "txt"), "Sign");
            // Initialize the library
            var eRet = FSLibrary.Init(sn, key);

            if (FSErrorCode.Success == eRet)
            {
                // Get the sample PDF file name from the bundle resources
                string pdfFileName = NSBundle.MainBundle.PathForResource("Sample", "pdf");
                // Load the PDF document
                string pdfPassword = "";
                var    doc         = FSPDFDoc.CreateFromFilePath(pdfFileName);
                if (FSErrorCode.Success == doc.Load(pdfPassword))
                {
                    // Create the view
                    var view = new FSPDFViewCtrl(new CoreGraphics.CGRect(
                                                     0, 0, this.View.Frame.Size.Width, this.View.Frame.Size.Height));
                    view.SetDoc(doc);
                    Add(view);
                }
            }
        }
コード例 #2
0
 void OnDocClosed(FSPDFDoc document, int error)
 {
 }
コード例 #3
0
 public void OnDocOpened(FSPDFDoc document, int error)
 {
 }