Exemplo n.º 1
0
        public void ExportDictionaryTest()
        {
            string inputSourceDirectory = FileInput("");
            string outputDirectory = FileOutput("");
            if (Directory.Exists(outputDirectory))
            {
                Directory.Delete(outputDirectory, true);
            }
            FolderTree.Copy(inputSourceDirectory, outputDirectory);
            Param.LoadSettings();
            _projInfo.ProjectPath = outputDirectory;
            _projInfo.ProjectInputType = "Dictionary";
            _projInfo.DefaultXhtmlFileWithPath = Common.PathCombine(outputDirectory, "ExportDictionarymain.xhtml");
            _projInfo.DefaultCssFileWithPath = Common.PathCombine(outputDirectory, "ExportDictionarymain.css");

            var target = new ExportPdf();
            const bool expectedResult = true;
            bool actual = target.Export(_projInfo);
            Assert.AreEqual(expectedResult, actual);
        }
Exemplo n.º 2
0
		private bool PrincePreview(PublicationInformation projInfo)
		{
			bool success = false;
			ExportPdf exportPdf = new ExportPdf();
			success = exportPdf.Export(projInfo);
			// copy to preview folder *******************
			return success;
		}
Exemplo n.º 3
0
        private void btnPrinceExport_Click(object sender, EventArgs e)
        {
            if (!File.Exists(txtInputPath.Text))
            {
                MessageBox.Show("Please enter the valid XHTML path");
                return;
            }

            if (!File.Exists(txtCSSInput.Text))
            {
                MessageBox.Show("Please enter the valid CSS path");
                return;
            }
            ExportPdf exportPDFPrince = new ExportPdf();
            PublicationInformation projInfo = new PublicationInformation();

            projInfo.ProjectPath = Path.GetDirectoryName(txtInputPath.Text);
            projInfo.DefaultXhtmlFileWithPath = txtInputPath.Text;
            projInfo.DefaultCssFileWithPath = txtCSSInput.Text;
            projInfo.ProjectInputType = radDictionary.Checked ? "Dictionary" : "Scripture";
            projInfo.ProjectFileWithPath = projInfo.ProjectPath;
            projInfo.DictionaryPath = projInfo.ProjectPath;
            exportPDFPrince.Export(projInfo);
        }