Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content is getting cropped in PDF #1101

Open
prachi-aspire opened this issue Feb 1, 2024 · 0 comments
Open

Content is getting cropped in PDF #1101

prachi-aspire opened this issue Feb 1, 2024 · 0 comments

Comments

@prachi-aspire
Copy link

prachi-aspire commented Feb 1, 2024

Screenshot from 2024-02-01 13-03-09

Issue description

while generating pdf my content is not breaking down for a page. It's getting cropped.

def general_ledger_pdf
@categories = Category.journal_categories(params[:accounting_business_id], @daterange)
render pdf: "#{file_name('General ledger')}", template: "accounting/general_ledger_pdf.html.erb", orientation: 'Landscape', margin: { bottom: 25, top: 20 }, :footer => { :html => { :template => "accounting/accounting_footer.html.erb"}}
end

this is my method who's calling pdf view page

<title><%= t('model.transaction.balance_sheet') %></title>
<meta charset="utf-8" />
<style type="text/css"> table, tr, td, th, tbody, thead, tfoot { page-break-inside: avoid !important; } td { padding: 12px 5px !important; } h5 { font-size: 18px !important; height: 18px; } .subject-column { max-width: 400px; } .attachment-column { max-width: 200px; } .subject-column small, .attachment-column small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .copyright-area { display: block; padding-top: 20px; } .bg-head { background: #eee; } <%= render partial: 'accounting/business_details' %> <%= render partial: 'accounting/index_general_ledger' ,locals: {categories: @categories} %> this is general_ledger_pdf.html.erb ## Expected or desired behavior ## System specifications ubuntu 20 wicked_pdf gem version (output of `cat Gemfile.lock | grep wicked_pdf`): wicked_pdf (2.1.0) wkhtmltopdf version (output of `wkhtmltopdf --version`): whtmltopdf [provider gem](https://rubygems.org/search?utf8=%E2%9C%93&query=wkhtmltopdf) and version if one is used: platform/distribution and version (e.g. Windows 10 / Ubuntu 16.04 / Heroku cedar):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant