我正在尝试通过使用命令行表格提取器工具来使用Tabula-Java。 使用此代码:
$elements = $xpath->query("//em");
foreach($elements as $e) {
$desc = $xpath->query("../following-sibling::text()", $e);
echo $e->nodeValue . $desc[0]->nodeValue ."<br/>";
}
运行时出现错误:
for %i in (c:/Tabular/RealistReportIn/*.pdf) do java -jar tabula.jar -a 113.603,199.283,187.808,255.128 -p 1 "$1" -a 114.368,258.188,187.043,318.623 -p 1 "$1" -a 112.838,321.683,186.278,381.353 -p 1 "$1" -a 115.133,384.413,184.748,471.623 -p 1 "$1" -a 193.163,26.393,250.538,306.383 -p 1 "$1" -a 190.103,307.913,258.953,597.083 -p 1 "$1" -a 264.308,25.628,403.538,301.028 -p 1 "$1" -a 268.898,303.323,411.188,597.848 -p 1 "$1" -a 36.338,24.098,186.278,302.558 -p 2 "$1" -a 35.573,307.148,195.458,592.493 -p 2 "$1" -a 201.578,24.863,299.498,305.618 -p 2 "$1" -a 318.623,25.628,359.168,302.558 -p 2 "$1" -a 441.023,24.863,492.278,305.618 -p 2 "$1" -a 441.788,307.913,492.278,584.078 -p 2 "$1" -b /c:/Tabular/RealistReportIn/ -n -o ./c:/Tabular/RealistReportOut/%~ni.csv ./RealistReportIn/
尝试--help寻求帮助