2014-09-16 3 views
0

나는 새우 (1.0.0)를 사용하여 테이블 내에서 테이블을 관리합니다. 지금까지 좋은 모든 것. 하지만 내부 테이블의 글꼴 크기가 다릅니다 (기본 글꼴 크기 같음) 외부 테이블보다.새우 : 내부 테이블의 글꼴 크기 변경

pdf = Prawn::Document.new 
table_data = [] 
table_data << ['iDirect', representation.idirect.yesno] 
people = [] 
representation.people.each do |person| 
    person_fullname = "#{person.lastname} #{person.firstname}" 
    person_fullname_title = if person.title.empty? 
    person_fullname 
    else 
    "#{person_fullname}, #{person.title}" 
    end 
    people << [person.function, person_fullname_title] 
end 
table_data << ['Personen', people] 
pdf.table table_data, cell_style: { size: 7, borders: [:bottom] }, column_widths: [90, 430] 

Prawn Table with different font size

나는

내가 내부 테이블의 글꼴 크기를 변경할 수있는 방법
# this doesn't affect the font size in the inside table  
pdf = Prawn::Document.new(:page_size => 'A4', :page_layout => :portrait, :size => 7) 

같은 생성자를 사용하여 기본 글꼴 크기를 무시하려고? 나는

pdf.font_size 7

간단한

답변

0

또한

"#{person_fullname, :size => 7}, #{person.title, :size => 7}" 
1

으로이 문제를 해결할 수

+0

솔루션 같은 것을, 세포에 경우 다른 내부에 추가 할 수 있습니다 더 유연합니다, 감사합니다! – StandardNerd