Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Calculated position incorrect when using regex in text file that also contains binary info (updated)

by vr (Curate)
on Jun 17, 2020 at 06:29 UTC ( #11118174=note: print w/replies, xml ) Need Help??


in reply to Re^2: Calculated position incorrect when using regex in text file that also contains binary info (updated)
in thread Calculated position incorrect when using regex in text file that also contains binary info

When doing this, I get the results back, but incorrect (same results as my very initial attempts...)

Show xref-table fragment for objects 1-10, or, better yet, provide a link to the test file. + Your approach to PDF hacking is seriously flawed, listen to what AM says and use proper API (CAM::PDF). You don't need to manually touch, contract or edit xref-table after deleting an object because it's done for you automatically, that's what API's for. Only pay attention that deleteObject is among "deeper utilities" for a reason -- one generally doesn't need to call it neither; unused objects will be cleansed for you automatically, too.

  • Comment on Re^3: Calculated position incorrect when using regex in text file that also contains binary info (updated)
  • Download Code

Replies are listed 'Best First'.
Re^4: Calculated position incorrect when using regex in text file that also contains binary info (updated)
by geertvc (Sexton) on Jun 17, 2020 at 17:37 UTC
    Hi,

    For sure I will take a look at the CAM::PDF module, I stated that in another reply here somewhere. But I would like to know why you say my approach of PDF hacking is seriously flawed? Can you explain?

    As I also replied somewhere else in this thread, I have Python code that works perfect and does the job 100% correct on the same file content, but it's extremely slow. That's the reason why I would like to give it a try with Perl, seen it outperforms many other languages with respect to text manipulation (wasn't this one of the main reasons Perl was developed in the first place?).

    So, I'm puzzled as to why my approach is flawed. Curious to hear/read your rationale behind this...


    Best rgds,
    Geert

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11118174]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2021-09-19 08:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?