Text interchanged
Opened this issue · 2 comments
noealejandro commented
The original position of the text into table's cells is changed. The table has the next two columns:
--------------------------------
----------------------------
Keyword 1: Ambient intelligence
| Keyword 2: Systematic review
--------------------------------
----------------------------
The result in csv is:
["Ambient intelligence Keyword 1:", "Systematic review Keyword 2:"]
Now, Keyword 1 and Keyword 2 are at the end of each sentence. How can I fix it?
Thanks in advance.
adworse commented
Could you please provide me with the original PDF?
noealejandro commented
Hello.
Yeah, sure. I attach only one page of the original PDF (it's too big), but
I can see the same problem on it. I also provide the generated csv and the
code.
(...)
pages = Iguvium.read('CVU_NACS_min.pdf')
tables = pages.flat_map { |page| page.extract_tables! }
arr_csv = tables.map(&:to_a)
#puts arr_csv
File.open("min.csv", "w") {|f| f.write(arr_csv.inject([]) { |csv, row|
csv << CSV.generate_line(row) }.join(""))}
Thank you.
…On Sun, 29 Mar 2020 at 05:05, Dima Ermilov ***@***.***> wrote:
Could you please provide me with the original PDF?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AH5HG7TA2ETHUMDDKARGCBDRJ4TQHANCNFSM4LVWL5JA>
.