Defect #10688

PDF export from Wiki - Problems with tables

Added by Cassiano Monteiro over 5 years ago. Updated over 5 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Toshi MARUYAMA% Done:

0%

Category:PDF export
Target version:2.0.3
Resolution:Fixed Affected version:1.4.0

Description

Printed out some wiki pages with tables, and got something like this on the PDF:

Table printed on PDF

The original table on the wiki was like this:

Sequência de Estímulos e Respostas
Estímulo Resposta
Usuário abre interface principal Sistema apresenta tela inicial
Usuário define dados de entrada (tail number ou configuração da aeronave) Sistema armazena os dados de entrada
Usuário escolhe opção de análise de decolagem (takeoff) Sistema exibe tela de parâmetros para análise de decolagem
Usuário define aeroporto/pista de origem Sistema valida e armazena aeroportos/pistas

It seems like the problem on the PDF was with italic words inside the table.

Apart from that, this feature is awesome, and it´s getting better and better. Thanks guys!

pdf_table.png - Table printed on PDF (42.7 KB) Cassiano Monteiro, 2012-04-17 13:55

redmine pdf table bold.png (14.8 KB) Rob D, 2012-06-14 03:54

redmine pdf table.png (16.3 KB) Rob D, 2012-06-14 03:54

tcpdf.rb_table_with_html_fix_r9852.diff Magnifier (2.8 KB) Jun NAITOH, 2012-06-17 14:35

wiki_test_sample_table.txt Magnifier - html table test case (2.25 KB) Jun NAITOH, 2012-06-17 14:35

before.pdf (414 KB) Toshi MARUYAMA, 2012-06-17 15:52

after.pdf (411 KB) Toshi MARUYAMA, 2012-06-17 15:52

Associated revisions

Revision 9853
Added by Toshi MARUYAMA over 5 years ago

fix PDF export tables problems (#10688)

Contributed by Jun NAITOH.

Revision 9854
Added by Toshi MARUYAMA over 5 years ago

Merged r9853 from trunk (#10688)

fix PDF export tables problems.

Contributed by Jun NAITOH.

Revision 9855
Added by Toshi MARUYAMA over 5 years ago

Merged r9853 from trunk (#10688)

fix PDF export tables problems.

Contributed by Jun NAITOH.

History

#1 Updated by Rob D over 5 years ago

We have the same problem in tables that have no italics or other formatting in the table, but use bold to create column headers and the headings become misaligned.

!redmine pdf table bold.png!

Removing the bold formatting shows correctly aligned header row, but the table width does not appear to be correct.

!redmine pdf table.png!

#2 Updated by Jun NAITOH over 5 years ago

Sorry, this tables problem is #69 patch's bug.

I corrected so that the html tag inside a table could not be used with a PDF export.

I finished tests on following environments.

  • CentOS 6 CRuby 1.8.7, 1.9.2, 1.9.3

#3 Updated by Toshi MARUYAMA over 5 years ago

  • Assignee set to Toshi MARUYAMA

#4 Updated by Toshi MARUYAMA over 5 years ago

  • Target version set to 2.0.3

#5 Updated by Toshi MARUYAMA over 5 years ago

  • File before.pdf added
  • File after.pdf added
  • Status changed from New to Closed
  • Resolution set to Fixed

Committed in trunk r9853, 2.0-stable r9854 and 1.4-stable r9855, thanks.

#6 Updated by Rob D over 5 years ago

Thanks guys, formatting seems to be fixed. However, the table width still doesn't fill the page width. A table with 2 columns only fills half the page width. Should this be a separate issue? Is there any reason that we need to have a minimum of 4 columns in the layout?

@default_table_columns ||= 4

...

if @default_table_columns < @max_table_columns[@table_id]
    @table_columns = @max_table_columns[@table_id];
else
    @table_columns = @default_table_columns;
end

#7 Updated by Jun NAITOH over 5 years ago

Rob D wrote:

Should this be a separate issue?

Yes.

Also available in: Atom PDF