Bug Hunting Session
Bug 64748 - PDF export renders placeholder texts
Summary: PDF export renders placeholder texts
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.3.3 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.2.0 target:5.1.4
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-19 00:20 UTC by christian.lohn
Modified: 2016-10-25 19:02 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Minimal example exhibiting the bug (8.47 KB, application/vnd.oasis.opendocument.text)
2013-05-19 11:15 UTC, christian.lohn
Details
Actual PDF export of minimal example (13.60 KB, application/pdf)
2013-05-19 11:17 UTC, christian.lohn
Details
Expected PDF export of minimal example (1.16 KB, application/pdf)
2013-05-19 11:18 UTC, christian.lohn
Details
Screenshot of minimal example exhibiting the bug (59.79 KB, image/png)
2013-05-19 11:19 UTC, christian.lohn
Details
Screenshot of actual PDF export of minimal example (25.08 KB, image/png)
2013-05-19 11:19 UTC, christian.lohn
Details
Screenshot of expected PDF export of minimal example (21.50 KB, image/png)
2013-05-19 11:19 UTC, christian.lohn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description christian.lohn 2013-05-19 00:20:32 UTC
PDF export does not omit placeholder texts (from Insert - Fields - Other - Functions tab) but renders them as they appear in the UI.
Comment 1 ign_christian 2013-05-19 03:27:44 UTC
Could you attach sample document and how to reproduce that problem? If possible some screenshot about what is expected & unexpected.
Comment 2 christian.lohn 2013-05-19 11:15:17 UTC
Created attachment 79517 [details]
Minimal example exhibiting the bug
Comment 3 christian.lohn 2013-05-19 11:17:59 UTC
Created attachment 79518 [details]
Actual PDF export of minimal example
Comment 4 christian.lohn 2013-05-19 11:18:36 UTC
Created attachment 79519 [details]
Expected PDF export of minimal example
Comment 5 christian.lohn 2013-05-19 11:19:08 UTC
Created attachment 79520 [details]
Screenshot of minimal example exhibiting the bug
Comment 6 christian.lohn 2013-05-19 11:19:34 UTC
Created attachment 79521 [details]
Screenshot of actual PDF export of minimal example
Comment 7 christian.lohn 2013-05-19 11:19:55 UTC
Created attachment 79522 [details]
Screenshot of expected PDF export of minimal example
Comment 8 christian.lohn 2013-05-19 11:27:15 UTC
- Steps to reprocude -:

1. Open new Writer Document
2. Choose INSERT - FIELDS - OTHER - FUNCTIONS tab
3. Choose type PLACEHOLDER - any FORMAT
4. Enter *placeholder text* in PLACEHOLDER and confirm insertion
5. Render document to PDF

- Actual output -:

A PDF document with the cyan underlined text "<placeholder text>", as it appears in the UI.

- Expected output -:

An empty PDF document.
Comment 9 christian.lohn 2013-06-08 11:34:29 UTC
Can someone confirm this bug?
Comment 10 ign_christian 2013-06-08 12:18:03 UTC
reproducible on LO 4.0.4.1 (Win7 32bit)

Tried printing with PDFcreator also produces same output. Even option 'Text placeholders' unticked in menu File > Print > tab 'LibreOffice Writer'
Comment 11 QA Administrators 2015-04-19 03:22:19 UTC Comment hidden (obsolete)
Comment 12 Buovjaga 2015-06-18 13:47:43 UTC
Still repro.

Win 7 Pro 64-bit Version: 5.1.0.0.alpha1+
Build ID: 437210d58f32177ef1829d704f7f4d2f1bbfbfdd
TinderBox: Win-x86@39, Branch:master, Time: 2015-06-18_07:21:56
Locale: fi-FI (fi_FI)
Comment 13 Armin Le Grand 2016-05-12 09:06:46 UTC
Did some checks:
-> Visible in 'Preview in Web Browser'
-> Visible in 'Print Preview'
-> Visible in PagePreview of last loaded Documents (fresh started LO)
-> Not visible in 'Print' Dialog Preview
-> Not part of PDF when using 'Print' and any Pdf-Printer tool
-> Visible in our PDF export
-> Visible in Export to XHTML
-> Not visible in Export to Jpeg (after that not visible in EditView and PageMargins are shown as full rectangle ... strange, ok again after reload)
-> Export to PNG same as Export to Jpeg (also strange)

So, what is intended and what is not intended? I interpret the bug report as 'should not be visible in PDF export'. Or would it be more precisely be 'should not be visible in any export'...?
Comment 14 Samuel Mehrbrodt (CIB) 2016-05-12 09:37:46 UTC
(In reply to Armin Le Grand (CIB) from comment #13)
> Did some checks:
> -> Visible in 'Preview in Web Browser'
> -> Visible in 'Print Preview'
> -> Visible in PagePreview of last loaded Documents (fresh started LO)
> -> Not visible in 'Print' Dialog Preview
> -> Not part of PDF when using 'Print' and any Pdf-Printer tool
> -> Visible in our PDF export
> -> Visible in Export to XHTML
> -> Not visible in Export to Jpeg (after that not visible in EditView and
> PageMargins are shown as full rectangle ... strange, ok again after reload)
> -> Export to PNG same as Export to Jpeg (also strange)
> 
> So, what is intended and what is not intended? I interpret the bug report as
> 'should not be visible in PDF export'. Or would it be more precisely be
> 'should not be visible in any export'...?

I'd say it should not be visible in any export. Can't see any use case. If someone complains we can still add an option to toggle the behavior.
Comment 15 Armin Le Grand 2016-05-12 10:04:05 UTC
Codepoint where decision is made is sw/source/core/text/porfld.cxx/SwFieldPortion::Paint ln 427. Decision is made using IsShowPlaceHolderFields() using an instance of SwViewOption. That option is changed when using Print/LibreOffice_Writer/Text_Placeholders checkbox.
Exactly that option is true at PDF export.
Comment 16 Commit Notification 2016-05-16 12:18:40 UTC
Oliver Specht committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d41d8383b783f048af626acb9460a9c973a5ee8d

    tdf#64748: added placeholder option to pdf export dialog in Writer

It will be available in 5.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 17 Commit Notification 2016-05-20 07:28:10 UTC
Oliver Specht committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=247e418485c276bb9e8dcb84a6e11b90191482a3&h=libreoffice-5-1

    tdf#64748: added placeholder option to pdf export dialog in Writer

It will be available in 5.1.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.