Skip to content
This repository has been archived by the owner on Jan 2, 2023. It is now read-only.

Large memory usage to generate footer/header in all pdf page #3251

Closed
wedercm opened this issue Dec 14, 2016 · 2 comments
Closed

Large memory usage to generate footer/header in all pdf page #3251

wedercm opened this issue Dec 14, 2016 · 2 comments
Labels

Comments

@wedercm
Copy link

wedercm commented Dec 14, 2016

Hi, I work in a rails application that needs to geneate a pdf document with footer/header in all pages. I'm using wkhtmltopdf gem with WickedPdf gem. My problem occurs when I try to genarete with 60 pages, and application, and application uses about 700MB of memory, but when I try to genarete pdf document without footer/header there is no problem with memory. Follows below my Wickedpdf with some wkhtmltopdf configuration.

WickedPdf.config = (WickedPdf.config || {}).merge({
  :layout      => "print",
  :disposition => "inline",
  :margin      => { top: 25, bottom: 15, left: 7, right: 7 },
  :dpi         => "300",
  :header      => { spacing: 20, html: {template: 'layouts/print/header.pdf.erb'} },
  :footer      => { spacing: 5, html: {template: 'layouts/print/footer.pdf.erb'} }
})
@alloylab
Copy link

what version are you running?

@alloylab
Copy link

alloylab commented Jul 5, 2018

We are closing this out since we haven't heard from you. If you are still having this issue please feel free to re-open it. Thanks.

@alloylab alloylab closed this as completed Jul 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants