2
我知道表文字提取不是每個人的一杯茶。但是在閱讀有關表格的PDF流數據時,有些東西我不明白。PDF表文字提取
表的PDF碼流:
q % Graphic State Starting Point
0 292.5 595.3 442.8 re % Rectangle x y Width Height
W* % Clipping Even Odd Rule
n % End without Filling
0 0 0 rg % Color of Stroke
161 735 m % Move to New Path
160.8 734.7 l 89.3 734.7 l 89 735 l 88.8 735.3 l 161.3 735.3 l
161 735 l % straight line
h % Close the Current Path
f* % Fill Path with Even Odd Rule
Q
,並強調是:
q % Graphic State Starting Point
1 0 0 1 451.5 759.5 cm % Current matrix
0.5 w % Width of Stroke
0 0 0 RG % color
0 -0.8 m % Move to New Path
72 -0.8 l % Straight Line
S % Stroke Line
Q % End of Graphic State
在強調m
修改cm
,並設置到451.5 759.5和直線從當前繪製點即451.5至72點,即493.5,即小於0.8至cm
,即759.5
我現在不明白,從哪一點到哪一點將如何繪製表格線。
爲什麼在你的問題中混合水平和垂直運動?基本上你說的是一些x運動不等於其他y運動。 – usr2564301
@Jongware我不明白你想說什麼? – Vineet1982
這是一系列重疊的長扁長方形。 Y僅從734.7到735.3變化。將出現在視覺上作爲一條線 – dwarring