forked from reingart/pyfpdf
-
Notifications
You must be signed in to change notification settings - Fork 261
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow add_link() to be called before add_page().
This patch sets the default page to 1 for add_link() if no pages have yet been added to the PDF, otherwise the default target is the current page. Page 1 is mandatory, so the target will definitely be valid even if it is not later pointed elsewhere with set_link(). Since this is no longer an error, the test/test_links.py test_inserting_link_with_no_page_number() has been changed to ensure that it produces the same document as the later test_later_call_to_set_link().
- Loading branch information
1 parent
bb3881b
commit 35efe39
Showing
3 changed files
with
18 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters