Download it now!
Bug 102862 - Print dialog comments value affecting PDF export
Summary: Print dialog comments value affecting PDF export
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
5.0.6.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:pdf
: 83832 (view as bug list)
Depends on:
Blocks: Print-Dialog PDF-Export
  Show dependency treegraph
 
Reported: 2016-09-30 13:35 UTC by Ophir LOJKINE
Modified: 2018-08-28 16:30 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
The original file (60.46 KB, application/vnd.oasis.opendocument.text)
2016-09-30 13:35 UTC, Ophir LOJKINE
Details
the generated PDF (136.78 KB, application/pdf)
2016-09-30 13:35 UTC, Ophir LOJKINE
Details
Screenshot of the problematic print option (107.51 KB, image/png)
2016-10-18 11:49 UTC, Ophir LOJKINE
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ophir LOJKINE 2016-09-30 13:35:21 UTC
Created attachment 127746 [details]
The original file

When opening the joined file, exporting it to PDF, leaving all default parameters, the generated PDF is completely wrong. It has huge top, bottom and right margins.
Comment 1 Ophir LOJKINE 2016-09-30 13:35:57 UTC
Created attachment 127747 [details]
the generated PDF
Comment 2 V Stuart Foote 2016-09-30 16:10:19 UTC
On Windows 10 Pro 64-bit (ver 1607) en-US with

Version: 5.2.2.2 (x64)
Build ID: 8f96e87c890bf8fa77463cd4b640a2312823f3ad
CPU Threads: 8; OS Version: Windows 6.19; UI Render: GL; 
Locale: en-US (en_US); Calc: group

Can not confirm with any configuration of the "Export to PDF" dialog.

- default JPEG compression, 90% and Reduce image resolution 300 DPI, Create PDF from FDF, export bookmarks, export placeholder

- lossless compression checked, and all other options cleared

The PNG art held in the Header frame is clipped and renders correctly in the PDF which is sized out at A4 page measurments.

Nor with the standard toolbar button -> uno:ExportDirectToPDF
Comment 3 Ákos 2016-10-07 13:27:27 UTC
I can not confirm too, with LO 5.1.0.1 32bit, Win10 Ent 64 bit, default pdf export settings. The export is perfect.
Comment 4 Yousuf Philips (jay) (retired) 2016-10-18 02:48:47 UTC Comment hidden (obsolete)
Comment 5 Ophir LOJKINE 2016-10-18 08:24:17 UTC Comment hidden (obsolete)
Comment 6 Yousuf Philips (jay) (retired) 2016-10-18 11:05:56 UTC Comment hidden (obsolete)
Comment 7 Ophir LOJKINE 2016-10-18 11:09:00 UTC Comment hidden (obsolete)
Comment 8 Yousuf Philips (jay) (retired) 2016-10-18 11:24:54 UTC
What disto are you running on? Can you let me know which PDF options are enabled in File > Export as PDF? How did you export it to PDF?

Tested 5.1.5 and master and wasnt able to reproduce this issue. If i had to guess, it looks as if it is adding a comments column to the export, but there arent any comments in the document.

Version: 5.1.5.2
Build ID: 7a864d8825610a8c07cfc3bc01dd4fce6a9447e5
CPU Threads: 2; OS Version: Linux 3.19; UI Render: default; 
Locale: en-US (en_US.UTF-8); Calc: group

Version: 5.3.0.0.alpha0+
Build ID: 45a7137c6796f33fbf5b8f7cb64e293260d991cb
CPU Threads: 2; OS Version: Linux 3.19; UI Render: default; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-10-13_23:38:06
Locale: en-US (en_US.UTF-8); Calc: group
Comment 9 Ophir LOJKINE 2016-10-18 11:40:22 UTC
Indeed! Thank you, you solved my problem, and I can now export PDF correctly.

But I still think this is a bug.

When you print a document that has comments, you have an option to print the comments in the margins. I once printed a document like that.

But the problem is that this option is REMEMBERED by LibreOffice forever, even for documents that don't have comments. And worst, this option is used for PDF export too, even if it isn't even present (or at least I didn't see it) it the PDF export panel.

Even worse: when a document doesn't have comments, you can't change this option in print options. This means that in order to remove these ridiculous margins, you have to add a comment in your current document, choose "File > Print", select "comments: none", then press "cancel", then remove the comments you just added, and then finally you can export your document as PDF !!!
Comment 10 Ophir LOJKINE 2016-10-18 11:49:47 UTC
Created attachment 128055 [details]
Screenshot of the problematic print option

Screenshot of the print options that affects PDF export and that is impossible to change when opening the print options window from a document that doesn't have comments.
Comment 11 Yousuf Philips (jay) (retired) 2016-10-18 12:39:37 UTC
Confirmed.

Steps:
1) Open a document without comments
2) Add a comment
3) Open print dialog and set comments to 'place in margins' and print
4) Undo the added comment
5) Export PDF
6) PDF comes out with blank comment margins area

Version: 5.3.0.0.alpha0+
Build ID: 45a7137c6796f33fbf5b8f7cb64e293260d991cb
CPU Threads: 2; OS Version: Linux 3.19; UI Render: default; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-10-13_23:38:06
Locale: en-US (en_US.UTF-8); Calc: group
Comment 12 Ophir LOJKINE 2016-10-18 16:36:45 UTC
I think the problem isn't only that "Print dialog comments value affects PDF export".

The problem is also that this print option affects documents that don't have comments.

Steps to reproduce:

1) Open a document with comments.
2) Open print dialog, set comments to "place in margins".
3) Press cancel.
4) Remove all comments.
5) Open print dialog.
6) The document prints with these huge margins, and the "comment" option is stuck to "place in margins".

I think this "comment" option should:
1) Be displayed in both the "print" and "export to PDF" dialogs.
2) Not affect documents that don't have comments in any manner.
Comment 13 Ophir LOJKINE 2016-10-20 10:58:20 UTC
I gave a look at the code.
I see that in core/view/vprint.cxx, in SwViewShell::PrintOrPDFExport, the condition to rescale the document is rPrintData.GetPrintPostIts() == SwPostItMode::InMargins. I think there should be an additional condition pPostItManager->HasNotes().


Plus, in SwPrintUIOptions::SwPrintUIOptions, a PrintAnnotationMode list box is created, that should also be created in ImpPDFTabDialog.


Am I right ?
Comment 14 Yousuf Philips (jay) (retired) 2016-10-20 16:35:05 UTC
(In reply to Ophir LOJKINE from comment #12)
> The problem is also that this print option affects documents that don't have
> comments.
> 
> Steps to reproduce:
> 
> 1) Open a document with comments.
> 2) Open print dialog, set comments to "place in margins".
> 3) Press cancel.
> 4) Remove all comments.
> 5) Open print dialog.
> 6) The document prints with these huge margins, and the "comment" option is
> stuck to "place in margins".

As we can only deal with one issue per bug, i'd suggest you file that bug as a separate one and reference this bug in the description. The solution to this issue is that if it disables the comment option, it should always reset the option to 'none'.

> I think this "comment" option should:
> 1) Be displayed in both the "print" and "export to PDF" dialogs.

As it is possible to embed comments into pdfs with the 'export comments' checkbox in the pdf dialog, i dont think this option is needed for pdf.

> 2) Not affect documents that don't have comments in any manner.

Yes this is what we hope to fix with this bug report.
Comment 15 Ophir LOJKINE 2016-10-20 17:20:52 UTC
>  i dont think this option is needed for pdf.
Why ? Not allowing to export comment in margins for PDFs would be a regression, wouldn't it ?
Comment 16 Yousuf Philips (jay) (retired) 2016-10-20 23:31:52 UTC
(In reply to Ophir LOJKINE from comment #15)
> Why ? Not allowing to export comment in margins for PDFs would be a
> regression, wouldn't it ?

I personally dont think its needed, but as you disagree, then please create a new bug report suggesting the addition of this option into the pdf dialog and the UX team will decide on its validity.
Comment 17 Ophir LOJKINE 2016-10-21 07:13:29 UTC Comment hidden (obsolete)
Comment 18 Cor Nouws 2016-10-21 08:26:04 UTC Comment hidden (obsolete)
Comment 19 Yousuf Philips (jay) (retired) 2016-10-21 08:47:33 UTC Comment hidden (obsolete)
Comment 20 Cor Nouws 2016-10-21 08:58:08 UTC Comment hidden (obsolete)
Comment 21 Yousuf Philips (jay) (retired) 2016-10-21 09:39:20 UTC
(In reply to Cor Nouws from comment #20)
> Might well be - I'm rather lost in 'false output', 'affecting' and similar
> descriptions, leaving too much room for my fantasy :)

Well we still dont know what 'false output' means for that bug report and this bug report is that the comments value is affecting the pdf export when we didnt want it to, somewhat similar to bug 83832.
Comment 22 QA Administrators 2017-10-30 08:29:37 UTC Comment hidden (obsolete)
Comment 23 Gabor Kelemen 2018-08-28 09:19:27 UTC
*** Bug 83832 has been marked as a duplicate of this bug. ***
Comment 24 Timur 2018-08-28 16:30:43 UTC
"The document prints with these huge margins" was duplicate of now solved Bug 91680
"the "comment" option is stuck to "place in margins"." is Bug 112294.
This bug is about "PDF comes out with blank comment margins area" but it looks solved, test with 6.0.6.

I'll set WFM. Feel free to reopen if tested otherwise.