private static string GetTextResult(XpdfParameter parameter) { string textResult = File.ReadAllText(parameter.OutputFilename); File.Delete(parameter.OutputFilename); return(textResult); }
public override string GetArguments(XpdfParameter parameter) { string arguments = this.JoinXpdfParameters(parameter); string newArguments = $"-c \"chmod +x ./{PDFToText}; ./{PDFToText} {arguments}\""; return(newArguments); }
private void PrepareParameters(string pdfFilePath) { this.filename = this.directoryService.Filename; this.workingDirectory = this.directoryService.WorkingDirectory; this.parameter = this.directoryService.GetParameter(pdfFilePath); this.arguments = this.directoryService.GetArguments(this.parameter); }
protected string JoinXpdfParameters(XpdfParameter parameter) { string[] argumentsArray = { parameter.Encoding, WrapQuotes(parameter.PdfFilename), WrapQuotes(parameter.OutputFilename), }; string arguments = string.Join(" ", argumentsArray); return(arguments); }
public override string GetArguments(XpdfParameter parameter) { var arguments = this.JoinXpdfParameters(parameter); return(arguments); }
public abstract string GetArguments(XpdfParameter parameter);