@@ -44,7 +44,6 @@ public class CommandLineApp {
4444 private OutputFormat outputFormat ;
4545 private String password ;
4646 private TableExtractor tableExtractor ;
47- private List <Float > verticalRulingPositions ;
4847
4948 public CommandLineApp (Appendable defaultOutput , CommandLine line ) throws ParseException {
5049 this .defaultOutput = defaultOutput ;
@@ -56,10 +55,6 @@ public CommandLineApp(Appendable defaultOutput, CommandLine line) throws ParseEx
5655 if (line .hasOption ('s' )) {
5756 this .password = line .getOptionValue ('s' );
5857 }
59- if (line .hasOption ('c' )) {
60- this .verticalRulingPositions = parseFloatList (line .getOptionValue ('c' ));
61- }
62-
6358 }
6459
6560 public static void main (String [] args ) {
@@ -165,12 +160,6 @@ private void extractFile(File pdfFile, Appendable outFile) throws ParseException
165160 while (pageIterator .hasNext ()) {
166161 Page page = pageIterator .next ();
167162
168- if (verticalRulingPositions != null ) {
169- for (Float verticalRulingPosition : verticalRulingPositions ) {
170- page .addRuling (new Ruling (0 , verticalRulingPosition , 0.0f , (float ) page .getHeight ()));
171- }
172- }
173-
174163 if (pageAreas != null ) {
175164 for (Pair <Integer , Rectangle > areaPair : pageAreas ) {
176165 Rectangle area = areaPair .getRight ();
@@ -290,7 +279,15 @@ public static List<Float> parseFloatList(String option) throws ParseException {
290279 List <Float > rv = new ArrayList <>();
291280 try {
292281 for (int i = 0 ; i < f .length ; i ++) {
293- rv .add (Float .parseFloat (f [i ]));
282+ final String element = f [i ];
283+
284+ if (element .startsWith ("%" )) {
285+
286+ rv .add (Float .parseFloat (element ));
287+ } else {
288+ rv .add (Float .parseFloat (element ));
289+ }
290+
294291 }
295292 return rv ;
296293 } catch (NumberFormatException e ) {
0 commit comments