Search found 15 matches

by isfando
2018-09-27T06:23:38-07:00
Forum: Users
Topic: Remove horizontal summation lines but keep a minus
Replies: 28
Views: 18315

Re: Remove horizontal summation lines but keep a minus

@snibgo i was able to formulate the following script for bash. (I feel good to contribute somehow to the topic) #!/bin/bash INPDF=$1 PAGES=$(exiftool -args -PageCount $INPDF | cut -d'=' -f2) N=$(( $PAGES )) for ((I=1;I<=$N;I++)); do convert -density 300 $INPDF[$I] -depth 8 -strip -background white ...
by isfando
2018-09-26T07:00:46-07:00
Forum: Users
Topic: Remove horizontal summation lines but keep a minus
Replies: 28
Views: 18315

Re: Remove horizontal summation lines but keep a minus

@snibgo i was able to formulate the following script for bash. (I feel good to contribute somehow to the topic) #!/bin/bash INPDF=$1 PAGES=$(exiftool -args -PageCount $INPDF | cut -d'=' -f2) N=$(( $PAGES )) for ((I=1;I<=$N;I++)); do convert -density 300 $INPDF[$I] -depth 8 -strip -background white -...
by isfando
2018-09-26T06:07:36-07:00
Forum: Users
Topic: Remove horizontal summation lines but keep a minus
Replies: 28
Views: 18315

Re: Remove horizontal summation lines but keep a minus

@snibgo okay thanks alot. Sorry i had to ask alot questions because of lack of previous experience on the topic.
by isfando
2018-09-26T04:24:46-07:00
Forum: Users
Topic: Remove horizontal summation lines but keep a minus
Replies: 28
Views: 18315

Re: Remove horizontal summation lines but keep a minus

@snibgo

Sorry i meant to say do you have an alternative to this script in the format of a bash script which can be run on linux server.
by isfando
2018-09-26T04:04:12-07:00
Forum: Users
Topic: Remove horizontal summation lines but keep a minus
Replies: 28
Views: 18315

Re: Remove horizontal summation lines but keep a minus

@snibgo

do you have a shell script alternative to this batch script.

Code: Select all

set INPDF=sam.pdf

for /F "usebackq" %%L in (`exiftool -args -PageCount %INPDF%`) do set %%L

set /A LASTPAGE=%-PageCount%-1

for /L %%I in (0,1,%LASTPAGE%) do call DoOnePage %INPDF%[%%I] out_%%I.png
by isfando
2018-09-25T15:42:33-07:00
Forum: Users
Topic: Remove horizontal summation lines but keep a minus
Replies: 28
Views: 18315

Re: Remove horizontal summation lines but keep a minus

@bratpit

okay i would give it a try.
by isfando
2018-09-25T15:40:03-07:00
Forum: Users
Topic: Remove horizontal summation lines but keep a minus
Replies: 28
Views: 18315

Re: Remove horizontal summation lines but keep a minus

@isfando: You have reverted to small characters, as you had in your first posts. Why? Your later post had larger characters, which will give better quality, thus better OCR. @snibgo What shows that i have reverted to small characters. I am not able to grasp it. I am trying to stream line the approa...
by isfando
2018-09-25T07:59:21-07:00
Forum: Users
Topic: Remove horizontal summation lines but keep a minus
Replies: 28
Views: 18315

Re: Remove horizontal summation lines but keep a minus

ok I got the point.Your guidance is indeed very helpful. I was able to construct your script on my machine. That goes through pdf and run your convert command page by page. But now the quality of the result png images are not sharp. Below i have given steps for two approaches and the result from ear...
by isfando
2018-09-25T06:37:59-07:00
Forum: Users
Topic: Remove horizontal summation lines but keep a minus
Replies: 28
Views: 18315

Re: Remove horizontal summation lines but keep a minus

Thanks for you suggestion. I will try to make use of it. But In my case i will run the script on a server machine where memory is not a problem.The server has 128gb ram. If the original convert script could be changed to handle a pdf file as a whole, it would make my work quite easy.I would want the...
by isfando
2018-09-25T04:23:53-07:00
Forum: Users
Topic: Remove horizontal summation lines but keep a minus
Replies: 28
Views: 18315

Re: Remove horizontal summation lines but keep a minus

I made the suggested changes and the results are pretty good. thanks alot. One last question in this regard. How can i feed a pdf file with multiple pages to your code and for each page the code is applied to it and as a result i get images in png format equal to number of pages in pdf file.
by isfando
2018-09-24T05:59:14-07:00
Forum: Users
Topic: Remove horizontal summation lines but keep a minus
Replies: 28
Views: 18315

Re: Remove horizontal summation lines but keep a minus

Thanks alot for the explanation now i have an idea of the pipeline. I noticed that the code still leaves a fragment of line at the bottom right corner of image. Plus any addition to smoothen numbers would be highly helpful. Before https://drive.google.com/open?id=135BfWCR0GFsAGSmUaastggLvCm7B0476 Af...
by isfando
2018-09-24T03:41:55-07:00
Forum: Users
Topic: Remove horizontal summation lines but keep a minus
Replies: 28
Views: 18315

Re: Remove horizontal summation lines but keep a minus

Snibgo it worked .thanks alot. If you can explain the script it would help me think independently and do changes in future. Currently i am not at a level to understand the pipeline of event happening in your code.
by isfando
2018-09-21T06:19:31-07:00
Forum: Users
Topic: Remove horizontal summation lines but keep a minus
Replies: 28
Views: 18315

Re: Remove horizontal summation lines but keep a minus

Sorry the pictures earlier were taken in a bit bad zoom and they were part of bigger picture which i cant post for confidentiality reason. I changed my lines to black and your command works for the most part but it leaves the jagged edges out. I am using the following command to convert from pdf to ...
by isfando
2018-09-21T05:05:19-07:00
Forum: Users
Topic: Remove horizontal summation lines but keep a minus
Replies: 28
Views: 18315

Re: Remove horizontal summation lines but keep a minus

I applied your command but it dont white the lines. It makes them grey. Before Applying your command https://drive.google.com/open?id=1EN3ZjRQ0S0ehxz7IsFeQH74lPwESQT8K After Applying your command https://drive.google.com/open?id=1vXmjCB9HhS9OX3gZ7i5WzzhPmfveDuTG I am using convert on windows with fo...
by isfando
2018-09-21T03:30:35-07:00
Forum: Users
Topic: Remove horizontal summation lines but keep a minus
Replies: 28
Views: 18315

Remove horizontal summation lines but keep a minus

Hi I need to ocr pdf of financial statements with horizontal lines before the summation. The lines decrease the accuracy of digits i am parsing therefore i need to remove the lines but keep a minus sign before a digit. The digits need to used for calculation after parsing therefore accuracy is a cru...