Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: Problem merging thousands of PDFs with PDF::API2: 'Deep recursion on subroutine "PDF::API2::Basic::PDF::Objind::release"'

by ateague (Monk)
on Oct 13, 2014 at 18:38 UTC ( [id://1103661]=note: print w/replies, xml ) Need Help??


in reply to Re: Problem merging thousands of PDFs with PDF::API2: 'Deep recursion on subroutine "PDF::API2::Basic::PDF::Objind::release"'
in thread [SOLVED] Problem merging thousands of PDFs with PDF::API2: 'Deep recursion on subroutine "PDF::API2::Basic::PDF::Objind::release"'

a 'correct' (but possibly destructive) fix would be to rebalance the pages as new ones are inserted.

Just for clarification, when you say "rebalance the pages", are you referring to a process wherein the script recursively processes and merges the PDF files in "batches" of say 16 files a piece?

e.g.:

LEVEL 1 (4_096 files): [pdf_level1] [pdf_level1] [pdf_level1] ... [pdf +_level1] LEVEL 2 ( 256 files): [[pdf_level1] * 16] [[pdf_level1] * 16] [[pdf_l +evel1] * 16] ... [[pdf_level1] * 16] LEVEL 3 ( 16 files): [[pdf_level2] * 16] [[pdf_level2] * 16] [[pdf_l +evel2] * 16] ... [[pdf_level2] * 16] LEVEL 4 ( 1 file): [[pdf_level3] * 16]
  • Comment on Re^2: Problem merging thousands of PDFs with PDF::API2: 'Deep recursion on subroutine "PDF::API2::Basic::PDF::Objind::release"'
  • Download Code

Replies are listed 'Best First'.
Re^3: Problem merging thousands of PDFs with PDF::API2: 'Deep recursion on subroutine "PDF::API2::Basic::PDF::Objind::release"'
by MidLifeXis (Monsignor) on Oct 13, 2014 at 19:56 UTC

    Almost, but not quite. More of a Balanced Tree algorithm.

    --MidLifeXis

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-23 18:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found