public void ScriptureReplaceBookNametoBookCodeTest() { _projInfo.ProjectInputType = "Scripture"; const string file = "ScripturePreview"; ExportProcess(file); string outputXhtmlFile = Common.PathCombine(_outputPath, file + ".xhtml"); File.Copy(_projInfo.DefaultXhtmlFileWithPath, outputXhtmlFile, true); ExportPdf pdfObj = new ExportPdf(); pdfObj.ReplaceBookNametoBookCode(outputXhtmlFile); FileCompare(file, ".xhtml"); }
private bool PrincePreview(PublicationInformation projInfo) { bool success = false; ExportPdf exportPdf = new ExportPdf(); success = exportPdf.Export(projInfo); // copy to preview folder ******************* return success; }
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); }
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); }