I would like to create an interface like the one pictured to do a text search within multiple PDF files. I would like to display the matching PDF file info, in the next column a snippet of the matching text and in the last column the actual pdf with the matching text highlighted. I am guessing to start would index with elasticsearch but would love to hear all suggestions.How best to accomplish this?
Related
I'm creating weekly reports and the data all come from a google sheet with the same format. Instead of entering the data manually in the word file. I created a Word template and want to import the data automatically from the google sheet to my Word template.
My Word template looks like:
The bolded data in the Word file come from the "New" column. The green/red data in the Word file come from "Diff" column.
I know how to get these data from the google sheet using Pandas, but I want to know how should I place them in the specific area in my word template.
I think the best way to go about it would be to go from Google Sheet -> Google Doc and take advantage of the native integration there. From there you can just export it as a .docx file or something and it should be openable in Word as well. I did this exact thing a while back, so it's definitely doable (if not easier now) but here's a place to start.
Is is possible to automate where i can extract particular data ( numbers) from scanned PDF file to excel file ?
Currently we need to go page by page to look for particular data and then manually type that in excel sheet .
Thanks
I have one use-case .Lets say there is pdf report which has data from testing of some manufacturing components
and this PDF report is loaded in DB using some internally developed software.
We need to develop some reconciliation program wherein the data needs to be compared from PDF report to Database. We can assume pdf file has a fixed template.
If there are many tables and some raw text data in pdf then how mysql save this pdf data..in One table or in many tables .
Please suggest some approach(preferably in python) for comparing data
Finding and extracting specific text from URL PDF files, without downloading or writing (solution) have a look at this example and see if it will help. I found it worked efficiently for me, this is if the pdf is URL based, but you could simply change the input source to be your DB. In your case you can remove the two if statements under the if isinstance(obj, pdfminer.layout.LTTextBoxHorizontal): line. You mention having PDFs with the same template, if you are looking to extract text from one specific area of the template, use the print statement that has been commented out to find coordinates of desired data. Then as is done in the example, use those coordinates in if statements.
I am trying to remove a page number text object from each page of a PDF I automate each month. I have been able to run a python script to create the final PDF I need, but am unable to automatically remove the incorrect page numbers and replace with new page nums in the correct order (as I have to piece this PDF together from multiple source PDFs.
Any thoughts on best way to complete this?
As shown in the below picture,there's an excel sheet and about 2,000 URLs of cover images in the F column.
What I want to do is that downloading the pictures with the URLs and replace the URL with the image correspondingly.
Download,Insert the pictures into F column and remove the URLs automatically.
How to complement it with Python ? Any suggestion or code is welcomed.Thanks.
I hope this answers your question:
Write a loop over the rows using Pandas library; you might find https://pandas.pydata.org/pandas-docs/version/0.23/generated/pandas.read_excel.html and How to iterate over rows in a DataFrame in Pandas? interesting.
Within every iteration save the corresponding picture into a folder (maybe name them with your Pandas index); Refer to
python save image from url
to learn how to save a picture from a URL.
Use XlsxWriter library to put them on their respective cell; see an example at
https://xlsxwriter.readthedocs.io/example_images.html