Issue 121415 - Cell content overlaps when exporting to PDF
Summary: Cell content overlaps when exporting to PDF
Status: CONFIRMED
Alias: None
Product: Calc
Classification: Application
Component: save-export (show other issues)
Version: 3.4.1
Hardware: PC Windows XP
: P3 Normal with 2 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-27 10:31 UTC by rc
Modified: 2014-12-22 20:46 UTC (History)
3 users (show)

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


Attachments
The spreadsheet file that gets wrong when exported to PDF (7.65 KB, application/vnd.oasis.opendocument.spreadsheet)
2012-11-27 10:31 UTC, rc
no flags Details
Exported PDF file (without print metric) (16.19 KB, application/pdf)
2012-11-27 10:32 UTC, rc
no flags Details
Exported PDF file (with print metric) (16.18 KB, application/pdf)
2012-11-27 10:33 UTC, rc
no flags Details
Original spreadsheet with overlapping text in PDF / print preview / ... (14.94 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-12-22 20:37 UTC, rra
no flags Details
New document with sheet content copied from the original one, no longer overlapping text (13.80 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-12-22 20:39 UTC, rra
no flags Details
Comparison of copy & pasted sheet contents (2 vs. 3 text rows) (315.82 KB, image/jpeg)
2014-12-22 20:46 UTC, rra
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description rc 2012-11-27 10:31:53 UTC
Created attachment 79958 [details]
The spreadsheet file that gets wrong when exported to PDF

When a cell content which is word-wrapped gets exported to PDF, the text inside the cells may overlap with the next row.

I have looked at similar bug report, and it was advised to use printer metric to solve this (http://wiki.openoffice.org/wiki/Calc/CellWrapping). However, I tried using printer metric and the result still overlaps.

I attached the ods file.
Comment 1 rc 2012-11-27 10:32:37 UTC
Created attachment 79959 [details]
Exported PDF file (without print metric)
Comment 2 rc 2012-11-27 10:33:00 UTC
Created attachment 79960 [details]
Exported PDF file (with print metric)
Comment 3 Edwin Sharp 2013-02-01 10:31:20 UTC
The file that Robin attached is indeed printed overlapping.
However, a fresh spreadsheet made with Rev. 1400866 printed OK.
Comment 4 rra 2014-12-22 20:37:52 UTC
Created attachment 84306 [details]
Original spreadsheet with overlapping text in PDF / print preview / ...
Comment 5 rra 2014-12-22 20:39:53 UTC
Created attachment 84307 [details]
New document with sheet content copied from the original one, no longer overlapping text
Comment 6 rra 2014-12-22 20:45:09 UTC
Experiencing this issue also with the current 4.1.1 version (rev. 1617669).

Interestingly, the problem can be solved by simply copying and pasting the complete contents of the problematic sheet to a new spreadsheet document, specifically the steps are: 

1. Open the attached brokenPrintPreview.ods
2. Click cell A1 so it has the focus
3. Press CTRL-A, then CTRL-C to copy the complete sheet contents
4. Create a new spreadsheet document
5. Click cell A1 so it has the focus
6. Press Shift-Insert to paste

Even more interesting: Doing the same but pasting into a new sheet of the same document will not solve the problem.

A visible difference between the cells in the original and the new document is that in the new document, the text inside the affected cells spans 3 text rows, where in the original sheet, the same text spanned only 2 rows (screenshot attached, "Comparison of copy & pasted sheet contents.jpg").

Besides the PDF feature, the print preview has the same problem.
Comment 7 rra 2014-12-22 20:46:14 UTC
Created attachment 84308 [details]
Comparison of copy & pasted sheet contents (2 vs. 3 text rows)