Perl how to compare two pdf files line by line


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Perl how to compare two pdf files line by line
# 1  
Old 07-24-2013
Perl how to compare two pdf files line by line

Hi Experts,

Would really appreciate if anyone can guide me how to compare two pdf files line by line and report the difference to another file.
# 2  
Old 07-24-2013
PDF files don't exactly have 'lines' per se, they're full of printer commands. That's what makes them such a hassle to create and edit.

If the contents are laid out in very specific ways it might be possible.
# 3  
Old 07-24-2013
First extract as text, then do the diff

Comes to mind: pdf2txt

and then there may be a Perl script that does the job of

diff. (See GNU tools for Windows if you are running MSWindows)
# 4  
Old 07-24-2013
Hi.

A Google search brought a few things, one of which is below ... cheers, drl

How to parse PDF
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Compare two files line by line in bash

Hello All! Thanks for taking time out and helping. My issue is, I have two files that have file names in it. Now, i need to go through each line of both the files and when the file names are different, i need to rename the file. Below is the example: File1</ fil1ename1.txt filename2,txt... (2 Replies)
Discussion started by: svks1985
2 Replies

2. Shell Programming and Scripting

Perl command line option '-n','-p' and multiple files: can it know a file name of a printed line?

I am looking for help in processing of those options: '-n' or '-p' I understand what they do and how to use them. But, I would like to use them with more than one file (and without any shell-loop; loading the 'perl' once.) I did try it and -n works on 2 files. Question is: - is it possible to... (6 Replies)
Discussion started by: alex_5161
6 Replies

3. Shell Programming and Scripting

How to read file line by line and compare subset of 1st line with 2nd?

Hi all, I have a log file say Test.log that gets updated continuously and it has data in pipe separated format. A sample log file would look like: <date1>|<data1>|<url1>|<result1> <date2>|<data2>|<url2>|<result2> <date3>|<data3>|<url3>|<result3> <date4>|<data4>|<url4>|<result4> What I... (3 Replies)
Discussion started by: pat_pramod
3 Replies

4. Shell Programming and Scripting

Compare fields in two files line by line

I am new to awk scripting. I want to do a field by word (field) comparison of two files File1.txt and File2.txt. The files contain a list of | (pipe) separated field. **File 1: ------------------- aaa|bbb|ccc|eee|fff lll|mmm|nnn|ooo|ppp rrr|sss|ttt|uuu|vvv** File 2: ... (7 Replies)
Discussion started by: dhruvmohan
7 Replies

5. Shell Programming and Scripting

perl: comparision of field line by line in two files

Hi everybody, First I apologize if my question seems demasiad you silly, but it really took 4 days struggling with this, I looked at books, forums ... And Also ask help to a friend that is software developer and he told me that it is a bad idea do it by perl... but this is my problem. I moved to... (8 Replies)
Discussion started by: Thelost
8 Replies

6. Shell Programming and Scripting

how to read the contents of two files line by line and compare the line by line?

Hi All, I'm trying to figure out which are the trusted-ips and which are not using a script file.. I have a file named 'ip-list.txt' which contains some ip addresses and another file named 'trusted-ip-list.txt' which also contains some ip addresses. I want to read a line from... (4 Replies)
Discussion started by: mjavalkar
4 Replies

7. Shell Programming and Scripting

How to compare two files line by line

Using diff to compare 2 files FILE1: AAA AAA AAA AAA AAA AAA FILE2: BBB BBB AAA AAA BBB BBB diff FILE1 FILE2 (3 Replies)
Discussion started by: yannsun
3 Replies

8. Shell Programming and Scripting

Compare two files line by line

Query: There are two files as below - /home/rgupta/input/file.txt.arch (source file) /home/rgupta/output/file.txt (destination file) Files details are attached for the reference. Scenario: File /home/rgupta/input/file.txt.arch picked up by an application xyz. Application xyz does... (2 Replies)
Discussion started by: ravigupta2u
2 Replies

9. Shell Programming and Scripting

Compare two text files line by line

Hi all I need help on comparing two texts files line by line and print the total number of lines matched. Any help is appreciated. Thanks in advance. (4 Replies)
Discussion started by: my_Perl
4 Replies

10. Shell Programming and Scripting

Perl: Search for string on line then compare numbers!

Hi All, I have a file that I need to be able to find a pattern match on a line, take the number on that line check if its >0.9 or <0.1 and if this is true write the line to output.out file. An example of 4 lines in my file is: 1. driver.I177.I11.net010 1.48622200477273e-05 2.... (2 Replies)
Discussion started by: Crypto
2 Replies
Login or Register to Ask a Question