Hello, I have a pdf file consisting of several hundred pages. Often text lines go beyond the page limit of the A4 format at the right side. So the text is there but not visible.

When I edit the pdf file in the Adobe Acrobat Pro, I can see that text is in a frame that goes beyond the limit. When I manually draw this frame or box smaller, i.e. pulling the right part into the visible area, than the text inside is completely in the visible area.

It's too much work to do this manually and to find all places. The font size of the text can be different and often the text begins somewhere in the middle.

Is there a way to find out with a perl script, where all textboxes are that go beyond the page limit? Or much better could I automatically minimize the right border of all text boxes to be in the visible are plus a small margin?

There are a lot of pdf libraries on CPAN. But I don't really know how to begin here. Thank you very much for your input!


In reply to pdf with too long lines by Dirk80

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.