質問

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