プロジェクト

全般

プロフィール

Vote #79264

完了

PDF export has too many whitespaces

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
PDF export_39
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
39
version_id:
142
issue_org_id:
28565
author_id:
348396
assigned_to_id:
332
comments:
13
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
120
ステータス-->[Closed]

説明

When exported in pdf format, there are too many whitespace under each note (attached).
As far as I can see, white space is automatically generated equal to the line number of the note.
I tested on Redmine 3.4.4.stable.17198 and Redmine 3.1.7.stable.17140, this issue persists.
Hope this issue is fixed soon.
Thank you !


journals

I can confirm this behaviour on 3.3.1.stable, 3.4.3.stable and 3.4.4.stable
The number of blank lines after each note seems to be identical to the number of lines of text in the note.
--------------------------------------------------------------------------------
Reproducible in the current trunk (r17315).
--------------------------------------------------------------------------------
I'm not a professional programmer. Hope someone can help me solve this problem, it is also quite important.
--------------------------------------------------------------------------------
The behavior is caused by source:trunk/lib/redmine/export/pdf/issues_pdf_helper.rb#L234
After each comment block the method @pdf.ln@ gets called without an argument. In this case the space height is equal to the last block.
https://www.rubydoc.info/gems/rbpdf/1.18.3/RBPDF:Ln

I've attached a patch to set the height to what I think is an appropriate value.

--------------------------------------------------------------------------------
I've found the same behavior for associated revisions and comments after journal entries.
Attached is a second patch to fix also these whitespace issues.
The spacings meet my esthetical reqiurements but feedback on this is hearty welcomed. :-)

--------------------------------------------------------------------------------
This is the result of my patch but it's quite difficult to show how it looks in a document...
!pdf_formatting_before_and_after.png!
--------------------------------------------------------------------------------
LGTM
--------------------------------------------------------------------------------
I think this is a problem of rbpdf.
Please wait for a while because we are working on correcting it.
--------------------------------------------------------------------------------
Jun NAITOH wrote:
> I think this is a problem of rbpdf.
> Please wait for a while because we are working on correcting it.

Do you think this is a bug or do you want to change the default behavior of the pdf.ln method?
Because as I wrote in #28565-6 that's the exact default behavior described in the rbpdf documentation.

> ... By default, the value equals the height of the last printed cell.

--------------------------------------------------------------------------------
Bernhard Rohloff wrote:
> Jun NAITOH wrote:
> > I think this is a problem of rbpdf.
> > Please wait for a while because we are working on correcting it.
>
> Do you think this is a bug or do you want to change the default behavior of the pdf.ln method?

Yes, I think it is a bug in rbpdf.

> Because as I wrote in #28565-6 that's the exact default behavior described in the rbpdf documentation.
>
> > ... By default, the value equals the height of the last printed cell.

By default, the value is intended to be the height of the last printed cell.
However, the current implementation has become the height of the last printed by MultiCell.

This means the height of multiple rows(MultiCell), but the expected specification is the height of one rows (Cell = charactor's hight).

!rbpdf_cell.png!

!rbpdf_multi_cell.png!
--------------------------------------------------------------------------------
I'm sorry it takes time to fix it.
This problem fixed by rbpdf 1.19.6.
please bundle update.

The fixed issues is as follows.

https://github.com/naitoh/rbpdf/issues/47

!rbpdf_1_19_5__1_19_6.png!
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Updated the Gemfile in the repository. Thank you for working hard on fixing this issue.
--------------------------------------------------------------------------------

Admin Redmine さんが約4年前に更新

  • カテゴリPDF export_39 にセット
  • 対象バージョン3.3.9_142 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0