Issue 119348 - hyperlinks fail when exporting selected pages to pdf
Summary: hyperlinks fail when exporting selected pages to pdf
Status: CLOSED FIXED
Alias: None
Product: Draw
Classification: Application
Component: save-export (show other issues)
Version: 3.4.0 Beta (OOo)
Hardware: PC All
: P3 Normal (vote)
Target Milestone: 4.0.0
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-14 12:39 UTC by Joe Smith
Modified: 2022-10-28 12:54 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
sample document for testing (9.67 KB, application/vnd.oasis.opendocument.graphics)
2012-05-14 12:43 UTC, Joe Smith
no flags Details
Proposed fix (1.32 KB, patch)
2012-05-15 13:44 UTC, Armin Le Grand
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Joe Smith 2012-05-14 12:39:21 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
Comment 1 Joe Smith 2012-05-14 12:43:22 UTC
Created attachment 77543 [details]
sample document for testing
Comment 2 hanya 2012-05-14 13:14:59 UTC
I compared pdf files exported only 1st and 2nd page, 2nd one did not have any link specified by /Type/Annot/Subtype/Link tag.
Comment 3 Giuseppe Castagno (aka beppec56) 2012-05-14 18:35:04 UTC
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.
Comment 4 Armin Le Grand 2012-05-15 13:42:23 UTC
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.
Comment 5 Armin Le Grand 2012-05-15 13:44:36 UTC
Created attachment 77546 [details]
Proposed fix
Comment 6 Armin Le Grand 2012-05-15 13:46:02 UTC
ALG: Comitted in r1338707, done so far
Comment 7 liuping 2012-06-25 06:21:01 UTC
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
Comment 8 Armin Le Grand 2012-06-25 12:06:59 UTC
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.
Comment 9 Armin Le Grand 2013-07-12 16:15:17 UTC
AL: DOne for AOO4.0
Comment 10 Joe Smith 2013-07-13 14:10:31 UTC
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!