Defect #13632

Empty page attached when exporting PDF

Added by Jan Stoetzer over 4 years ago. Updated about 4 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:PDF export
Target version:2.3.4
Resolution:Fixed Affected version:

Description

When exporting a PDF file, regardless whether from a ticket, ticket listing or wiki page, an empty page is added as last page of the export.

lxlib_tickets.pdf - PDF exported from ticket listing (312 KB) Jan Stoetzer, 2013-03-28 22:23

lxlib-641.pdf - PDF exported from ticket (309 KB) Jan Stoetzer, 2013-03-28 22:23

tcpdf.rb_r12127.patch Magnifier (680 Bytes) Jun NAITOH, 2013-09-11 15:25

Associated revisions

Revision 12189
Added by Toshi MARUYAMA about 4 years ago

pdf: fix empty page attached when exporting (#13632)

Contributed by Jun NAITOH.

Revision 12191
Added by Toshi MARUYAMA about 4 years ago

Merged r12189 from trunk to 2.3-stable (#13632)

pdf: fix empty page attached when exporting.

Contributed by Jun NAITOH.

History

#1 Updated by Jan Stoetzer over 4 years ago

Sorry, forgot:

Environment:
  Redmine version                          2.1.2.stable
  Ruby version                             1.8.7 (amd64-freebsd9)
  Rails version                            3.2.8
  Environment                              production
  Database adapter                         MySQL
Redmine plugins:
  redmine_inline_attach_screenshot         0.4.2
  redmine_latex_mathjax                    0.1.0
  redmine_lightbox                         0.0.1
  redmine_people                           0.0.1

#2 Updated by Etienne Massip over 4 years ago

  • Status changed from New to Needs feedback
  • Resolution set to Cant reproduce

Can't reproduce on issue list with 2.3.0, might be caused by a plugin?

#3 Updated by Jan Stoetzer over 4 years ago

I try to deactivate the plugins and report again. This may take some days, i am on a trip for the weekend.

#4 Updated by Filou Centrinov over 4 years ago

Using the programm PDF-XChange I can confirm this bug. Acrobat Reader or FoxitReader do not add an empty page.
@Jan Stoetzer: Which pdf viewer are you using?

#5 Updated by Filou Centrinov over 4 years ago

The internal pdf viewer from firefox (version 19.0.2) breaks when trying to display a pdf that was exported from redmine.

#6 Updated by Jan Stoetzer over 4 years ago

I used SumatraPDF on Win7.
This happens regardless whether the plugins are activated or not.

Edit:
  • I just tested it which the default PDF-Viewer of Ubuntu10 (I do not know its name), the effect does not appear there.
  • The internal PDF viewer of Firefox 19 (Linux and windows) does not display the PDF at all, the Open/Save dialogue is opened immediately.

#7 Updated by Filou Centrinov over 4 years ago

  • Yes, I can confirm that SumatraPDF displays an additional empty page.
  • When firefox opens pdf in the open/save dialog it doesn't say anything about the internal PDF viewer. If you want to test the internal pdf viewer you have to make sure that the pdf is not forced to be downloaded. Therefor I put the pdf into my localhost server an call it like localhost/my_pdf_file.pdf

It seems that the exported pdf files are corrupted and some viewers have problems with displaying these pdf files.

#8 Updated by Philip Lapczynski over 4 years ago

I can confirm that this happens to me as well. Currently running 1.4.3.stable, but it is the same with all of the installations I've used. PDF-Xchange Viewer always shows an empty page.

#9 Updated by Toshi MARUYAMA over 4 years ago

  • Category set to PDF export

#10 Updated by Filou Centrinov over 4 years ago

Status: Confimed

Summery
Defect on: PDF-XChange, SumatraPDF
No defect on: Acrobat Reader, FoxitReader

The online pdf analyzer also confims that the exported pdf isn't well formed.

#11 Updated by Toshi MARUYAMA over 4 years ago

  • Status changed from Needs feedback to Confirmed

#12 Updated by Etienne Massip over 4 years ago

  • Target version set to Candidate for next minor release

#13 Updated by Jun NAITOH about 4 years ago

I wrote patch for trunk.

Defect on: PDF-XChange, SumatraPDF

I checked that the problem had been corrected on PDF-XChange and SumatraPDF.

The online pdf analyzer also confims that the exported pdf isn't well formed.

I checked that the problem had been corrected on pdf analyzer, too.

Successful completion
The file was successfully analyzed, and no corruptions have been detected.

I finished tests on following environments.

  • CentOS 6 CRuby 1.8.7, 1.9.3

#14 Updated by Toshi MARUYAMA about 4 years ago

  • Target version changed from Candidate for next minor release to 2.3.4
  • Resolution deleted (Cant reproduce)

#15 Updated by Toshi MARUYAMA about 4 years ago

  • Status changed from Confirmed to Closed
  • Resolution set to Fixed

Committed in trunk r12189 and 2.3-stable r12191, thanks.

#16 Updated by Jan Stoetzer about 4 years ago

Good work, thank you for fixing this.

Also available in: Atom PDF