https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292021-08-06T21:30:36ZRedmineRedmine - Feature #35683: PDF rendering improvements when exporting an issue or a list of issueshttps://www.redmine.org/issues/35683?journal_id=1035902021-08-06T21:30:36ZMischa The Evil
<ul><li><strong>Target version</strong> set to <i>Candidate for next minor release</i></li></ul><p>Nice improvements.</p> Redmine - Feature #35683: PDF rendering improvements when exporting an issue or a list of issueshttps://www.redmine.org/issues/35683?journal_id=1037782021-08-16T12:36:20ZGo MAEDA
<ul><li><strong>Target version</strong> changed from <i>Candidate for next minor release</i> to <i>5.0.0</i></li></ul><p>Setting the target version to 5.0.0.</p> Redmine - Feature #35683: PDF rendering improvements when exporting an issue or a list of issueshttps://www.redmine.org/issues/35683?journal_id=1039142021-08-24T07:08:02ZJens Krämerjk@jkraemer.net
<ul><li><strong>File</strong> <i>0001-interpret-thumbnail-macro-in-description-notes-and-f.patch</i> added</li></ul><p>One more patch (based on the first two) which introduces the full rendering of last notes, description and formatted full width custom fields for the tabular issues list PDF export.</p> Redmine - Feature #35683: PDF rendering improvements when exporting an issue or a list of issueshttps://www.redmine.org/issues/35683?journal_id=1039252021-08-25T01:09:01ZMischa The Evil
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Needs feedback</i></li><li><strong>Assignee</strong> set to <i>Jens Krämer</i></li></ul><p>Jens Krämer wrote:</p>
<blockquote>
<p>One more patch (based on the first two) [...]</p>
</blockquote>
<p>Jens, I have only read the patch, but it seems to contain an error/typo. Shouldn't:</p>
<pre><code class="diff syntaxhl"><span class="gh">diff --git a/lib/redmine/export/pdf/issues_pdf_helper.rb b/lib/redmine/export/pdf/issues_pdf_helper.rb
index 98c7347ab..f55c80f5c 100644
</span><span class="gd">--- a/lib/redmine/export/pdf/issues_pdf_helper.rb
</span><span class="gi">+++ b/lib/redmine/export/pdf/issues_pdf_helper.rb
</span><span class="p">@@ -232,14 +225,7 @@</span> module Redmine
if journal.notes?
pdf.ln unless journal.details.empty?
pdf.SetFontStyle('', 8)
<span class="gd">- text =
- textilizable(
- journal, :notes,
- :only_path => false,
- :edit_section_links => false,
- :headings => false,
- :inline_attachments => false
- )
</span><span class="gi">+ text = pdf_format_text(issue, :description)
</span> pdf.RDMwriteFormattedCell(190, 5, '', '', text, issue.attachments, "")
end
pdf.ln
</code></pre>
<p>actually be:</p>
<pre><code class="diff syntaxhl"><span class="gh">diff --git a/lib/redmine/export/pdf/issues_pdf_helper.rb b/lib/redmine/export/pdf/issues_pdf_helper.rb
index 98c7347ab..f55c80f5c 100644
</span><span class="gd">--- a/lib/redmine/export/pdf/issues_pdf_helper.rb
</span><span class="gi">+++ b/lib/redmine/export/pdf/issues_pdf_helper.rb
</span><span class="p">@@ -232,14 +225,7 @@</span> module Redmine
if journal.notes?
pdf.ln unless journal.details.empty?
pdf.SetFontStyle('', 8)
<span class="gd">- text =
- textilizable(
- journal, :notes,
- :only_path => false,
- :edit_section_links => false,
- :headings => false,
- :inline_attachments => false
- )
</span><span class="gi">+ text = pdf_format_text(journal, :notes)
</span> pdf.RDMwriteFormattedCell(190, 5, '', '', text, issue.attachments, "")
end
pdf.ln
</code></pre>
<p>If so, then I think <code>pdf_format_text</code> would be better defined as something along the lines of:</p>
<pre><code class="diff syntaxhl"><span class="gh">diff --git a/lib/redmine/export/pdf/issues_pdf_helper.rb b/lib/redmine/export/pdf/issues_pdf_helper.rb
index 98c7347ab..f55c80f5c 100644
</span><span class="gd">--- a/lib/redmine/export/pdf/issues_pdf_helper.rb
</span><span class="gi">+++ b/lib/redmine/export/pdf/issues_pdf_helper.rb
</span><span class="p">@@ -375,6 +368,15 @@</span> module Redmine
pdf.output
end
+ def pdf_format_text(object, attribute)
<span class="gi">+ textilizable(object, attribute,
+ :only_path => false,
+ :edit_section_links => false,
+ :headings => false,
+ :inline_attachments => false
+ )
+ end
+
</span> def is_cjk?
case current_language.to_s.downcase
when 'ja', 'zh-tw', 'zh', 'ko'
</code></pre> Redmine - Feature #35683: PDF rendering improvements when exporting an issue or a list of issueshttps://www.redmine.org/issues/35683?journal_id=1039282021-08-25T09:46:14ZJens Krämerjk@jkraemer.net
<ul><li><strong>File</strong> <i>0001-interpret-thumbnail-macro-in-description-notes-and-f.patch</i> added</li></ul><p>you're completely right, I attached an updated patch.</p> Redmine - Feature #35683: PDF rendering improvements when exporting an issue or a list of issueshttps://www.redmine.org/issues/35683?journal_id=1039292021-08-25T09:51:14ZJens Krämerjk@jkraemer.net
<ul><li><strong>File</strong> <a href="/attachments/27952">0001-interpret-thumbnail-macro-in-description-notes-and-f.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/27952/0001-interpret-thumbnail-macro-in-description-notes-and-f.patch">0001-interpret-thumbnail-macro-in-description-notes-and-f.patch</a> added</li></ul><p>Here it is, for real.</p> Redmine - Feature #35683: PDF rendering improvements when exporting an issue or a list of issueshttps://www.redmine.org/issues/35683?journal_id=1039312021-08-25T12:46:36ZMischa The Evil
<ul><li><strong>File</strong> deleted (<del><i>0001-interpret-thumbnail-macro-in-description-notes-and-f.patch</i></del>)</li></ul> Redmine - Feature #35683: PDF rendering improvements when exporting an issue or a list of issueshttps://www.redmine.org/issues/35683?journal_id=1039322021-08-25T12:47:12ZMischa The Evil
<ul><li><strong>File</strong> deleted (<del><i>0001-interpret-thumbnail-macro-in-description-notes-and-f.patch</i></del>)</li></ul> Redmine - Feature #35683: PDF rendering improvements when exporting an issue or a list of issueshttps://www.redmine.org/issues/35683?journal_id=1039332021-08-25T12:56:05ZMischa The Evil
<ul><li><strong>Status</strong> changed from <i>Needs feedback</i> to <i>New</i></li><li><strong>Assignee</strong> deleted (<del><i>Jens Krämer</i></del>)</li></ul><p>Jens, thanks for the update. I've removed the faulty files to keep it clear.</p>
@committers: the correct order of the patchset is:
<ol>
<li><a class="attachment" href="https://www.redmine.org/attachments/27836">0001-render-formatted-full-width-custom-fields-in-the-sam.patch</a></li>
<li><a class="attachment" href="https://www.redmine.org/attachments/27835">0001-retrieve-filenames-of-thumbnails-when-rendering-a-PD.patch</a></li>
<li><a class="attachment" href="https://www.redmine.org/attachments/27952">0001-interpret-thumbnail-macro-in-description-notes-and-f.patch</a></li>
</ol> Redmine - Feature #35683: PDF rendering improvements when exporting an issue or a list of issueshttps://www.redmine.org/issues/35683?journal_id=1040472021-09-06T19:23:20ZMarius BĂLTEANU
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Resolved</i></li><li><strong>Assignee</strong> set to <i>Marius BĂLTEANU</i></li></ul><p>All three patches committed, thanks for the nice improvements.</p> Redmine - Feature #35683: PDF rendering improvements when exporting an issue or a list of issueshttps://www.redmine.org/issues/35683?journal_id=1040482021-09-06T19:24:05ZMarius BĂLTEANU
<ul><li><strong>Subject</strong> changed from <i>PDF rendering improvements</i> to <i>PDF rendering improvements when exporting an issue or a list of issues</i></li></ul> Redmine - Feature #35683: PDF rendering improvements when exporting an issue or a list of issueshttps://www.redmine.org/issues/35683?journal_id=1040532021-09-06T20:56:34ZMarius BĂLTEANU
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Closed</i></li></ul> Redmine - Feature #35683: PDF rendering improvements when exporting an issue or a list of issueshttps://www.redmine.org/issues/35683?journal_id=1050432022-01-04T02:16:43ZGo MAEDA
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/34709">Defect #34709</a>: No Images in PDF export of issue list (with option show description)</i> added</li></ul> Redmine - Feature #35683: PDF rendering improvements when exporting an issue or a list of issueshttps://www.redmine.org/issues/35683?journal_id=1061722022-03-27T03:02:22ZGo MAEDA
<ul><li><strong>Tracker</strong> changed from <i>Patch</i> to <i>Feature</i></li></ul>