private void btnProcess_Click(object sender, EventArgs e) { try { var processor = new Processor.PDFProcessor(); var textFromPDF = processor.GetTextFromPDF(txtPDFPath.Text, AllPages ? 0 : (int)numFrom.Value, AllPages ? 0 : (int)numTo.Value); var outputFileName = string.Format("{0}/{1}", SelectedOutputFolder, PdfFileName.Replace("pdf", "txt")); CreateFile(outputFileName, textFromPDF); MessageBox.Show("Processamento Concluido"); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public string GenerateGeneratedPdfCompletePath() { var cleanedFileName = PdfFileName.Replace(".pdf", string.Empty); return($@"{PathToSavePdfGenerated}\{cleanedFileName}.pdf"); }