Apache OpenOffice (AOO) Bugzilla – Issue 119348
hyperlinks fail when exporting selected pages to pdf
Last modified: 2022-10-28 12:54:30 UTC
Tested: OpenOffice.org 3.3 330m20(Build:9567) on Fedora Linux. File > Export to PDF; choose a page range to export; ok Check exported pdf: links on some exported pages do not work, depending on what pages are exported. With attached drawing, pages 1-3, and evince 2.30.3: Export pages Result ------- ------------ (all) ok 1 ok 2 no links work 3 no links work 1,2 ok 2,3 no links on first exported page, second page ok 1,3 links on first exported page ok, no links on second page 1,2,3 ok Other pdf viewers give different results; see http://user.services.openoffice.org/en/forum/viewtopic.php?f=11&t=53862
Created attachment 77543 [details] sample document for testing
I compared pdf files exported only 1st and 2nd page, 2nd one did not have any link specified by /Type/Annot/Subtype/Link tag.
Tested with AOO 3.4.O (AOO340m1 build 9590) on Ubuntu 10.04 Used Acrobat 9.5.1 to test the exported PDF. I repeated the test as in description above, with the same results.
ALG: I think I found it; the PageNumber used during export was the PageNumber from the source page, not the created export page. Every time the number did not exist as output page, the links were not created. Case '2': Used number was 1 (n-1), but created was number 0 -> no links Case '3': Used 2, created 0 -> no links Case '2,3': Used 1 while creating 0 (2 while 1) -> no links Case '1,3': Used 0 while creating 0 -> Okay, (2 while 1) -> no links The defect explains the missing links, all cases fit. To fix, I changed the PDF page creator to use a increasing counting number which is equivalent to the pages which get created. Checked the cases, works well.
Created attachment 77546 [details] Proposed fix
ALG: Comitted in r1338707, done so far
confirm fixing the bug on ver 1351249 on ubuntu ,fail Export pages Result ------- ------------ (all) ok 1 ok 2 no links work 3 no links work 1,2 ok 2,3 no links on first exported page, second page ok 1,3 links on first exported page ok, no links on second page 1,2,3 ok
ALG->iupingtan: Checked in trunk, works as expected. What version is 1351249? This fix is not for AOO3.4.1, but for the trunk (probably 3.5). Thus, if 1351249 is 3.4.1 (I do not know currently), it is not expected to work there.
AL: DOne for AOO4.0
Testing AOO400m3(Build:9702) - Rev. 1502185 2013-07-11 08:22:42 (Thu, 11 Jul 2013) - Linux i686 on Fedora 17 Looks good: all links in sample document are in exported pdf, even when exporting specific page ("2") or page range.("2,3"). Thanks to everyone who helped with this!