Reputation: 13002
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?
Upvotes: 0
Views: 345
Reputation: 842
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;
}
}
Upvotes: 4