문제

I have installed the PDFKit gem within my app and if i call .pdf on any of my urls it generates a pdf version of the page.

config.middleware.use PDFKit::Middleware,
    :page_size => 'A4',
    :margin_top => '0.39in',
    :margin_right => '0.39in',
    :margin_bottom => '0.39in',
    :margin_left => '0.39in',:print_media_type => true

Is set in my application.rb file but i have a fixed footer that is jumping in between elements when the page is rendered in pdf is there a way to exclude it so that it is ignored by PDF kit?

도움이 되었습니까?

해결책

Have you tried adding css specifically for the print media type and setting the footer to not display? Something like:

@media print {  
  #footer {  
        display: none;  
    }  
}  
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top