示例#1
0
        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);
        }
示例#3
0
        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);
        }
示例#4
0
        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);
        }
示例#6
0
 public abstract string GetArguments(XpdfParameter parameter);