PhilterPaper / Perl-PDF-Builder

Extended version of the popular PDF::API2 Perl-based PDF library for creating, reading, and modifying PDF documents
https://www.catskilltech.com/FreeSW/product/PDF%2DBuilder/title/PDF%3A%3ABuilder/freeSW_full
Other
6 stars 7 forks source link

[CTS 3] Missing code #51

Open PhilterPaper opened 7 years ago

PhilterPaper commented 7 years ago

This thread is for listing apparently unimplemented code (currently dummy stubs) that was forgotten by someone.

To start:

In lib/PDF/Builder/Basic/Pages.pm, there is a method rebuild_tree() that claims to rebuild (rebalance) the tree to meet Adobe specifications. Unfortunately, the code is empty.

=head2 $root_pages = $p->rebuild_tree([@pglist])

Rebuilds the pages tree to make a nice balanced tree that conforms to Adobe
recommendations. If passed a pglist then the tree is built for that list of
pages. No check is made of whether the pglist contains pages.

Returns the top of the tree for insertion in the root object.

It doesn't appear to return anything, for that matter, so better not try using it…

sub rebuild_tree {
    my ($self, @pglist) = @_;
}

Apparently, the unbalanced trees are still legal, just not efficient. I'm not sure this method is called, anyway (but is mentioned in add_page()). I'll add a warning in the POD.

Update for 3.015: remove (comment out) all mention of rebuild_tree()