Hi All.
I want to extract information given in annotations (comments) inside PDF files, using regex.
When I open the PDF file in EditPlus it shows me a large file with about 10,000 lines containing the data I need & also lots of text that looks like junk, but when I read it through Perl it just reads about 29 lines & lots of the junk from PDF is missing.
I tried the texttopdf modules availabe, but they do not give me the contents in the annotations.
open (PDFTYPELOG, "+>pdftype.txt") or die "cannot open file errorl +og.txt for writing : $!"; open (FILE_HANDLE, "D:\\MyScripts\\Social008-017.pdf") or die "can +not Social008-017.pdf for reading : $!"; while ($LineContent = <FILE_HANDLE>) { print PDFTYPELOG ($LineContent); }
Please tell me how can I read the whole file line by line (if possible).
Regards.
An_Ordinary_Man

In reply to Read PDF files & do regex through Perl. by an_ordinary_man

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.