Esempio n. 1
0
        private void doLoadFromPdfFile()
        {
            this.Cursor = Cursors.WaitCursor;
            try
            {
                FileInfo pdfFileInfo = frmLoadFromPdfFile.PdfBinaryFile;

                ConsoleWriteLine("Loading Pdf Binary File: {0}", pdfFileInfo.FullName);

                ctlXslFOViewer.LoadPdf(pdfFileInfo);
            }
            finally
            {
                this.Cursor   = Cursors.Default;
                this.LoadType = XslFOLoadType.LoadedFromXslt;
            }
        }
Esempio n. 2
0
        private void mnuLoadXslFOFromXml_Click(object sender, EventArgs e)
        {
            try
            {
                if (frmLoadFromXslFO.ShowDialog(this) == DialogResult.OK)
                {
                    ClearConsole();
                    doLoadFromXslFO();
                }
            }
            catch (Exception)
            {
                this.Cursor   = Cursors.Default;
                this.LoadType = XslFOLoadType.LoadedFromXslt;

                //MessageBox.Show(String.Format("Error occurred loading Xml-FO from Xml FO File:  {0}{1}", Environment.NewLine, exc.GetMessages()));
            }
        }
Esempio n. 3
0
        private void doLoadFromXslt()
        {
            this.Cursor = Cursors.WaitCursor;
            try
            {
                FileInfo xmlSourceFileInfo  = frmLoadFromXslt.XmlSourceFile;
                FileInfo xsltSourceFileInfo = frmLoadFromXslt.XsltSourceFile;

                //Update the BaseDirectory for processing relative paths to Resources
                _pdfOptions.BaseDirectory = xsltSourceFileInfo.Directory;

                ConsoleWriteLine("Loading Document Xml: {0}", xmlSourceFileInfo.FullName);
                ConsoleWriteLine("Loading Document Xslt: {0}", xsltSourceFileInfo.FullName);

                ctlXslFOViewer.LoadXslt(xmlSourceFileInfo, xsltSourceFileInfo, _pdfOptions);
            }
            finally
            {
                this.Cursor   = Cursors.Default;
                this.LoadType = XslFOLoadType.LoadedFromXslt;
            }
        }