<?xml version="1.0"?>
<component name="org.nuxeo.ecm.platform.convert.commandline.pdf2text.override">

  <require>org.nuxeo.ecm.platform.convert.commandline.pdf2text</require>

  <extension point="command" target="org.nuxeo.ecm.platform.commandline.executor.service.CommandLineExecutorComponent">

    <command enabled="true" name="pdftotext">
      <commandLine>pdftotext</commandLine>
      <parameterString>-enc UTF-8 #{sourceFilePath} #{targetFilePath}</parameterString>
      <winParameterString>-enc UTF-8 #{sourceFilePath} #{targetFilePath}</winParameterString>
      <installationDirective>You need to install pdftotext.</installationDirective>
    </command>

    <command enabled="true" name="ps2pdf">
      <commandLine>gs</commandLine>
      <winCommand>gswin64c</winCommand>
      <parameterString>-dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dEPSCrop -sOutputFile=#{targetFilePath}
        #{sourceFilePath}</parameterString>
      <testParameterString>-dNODISPLAY</testParameterString>
      <installationDirective>You need to install GhostScript.</installationDirective>
    </command>

  </extension>

</component>
