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
how to set height of page size to auto? #974
Comments
Hi @vonchristian, I'm afraid there's no way to set 'auto' for a page height. PDF's main use case is a paged documents. As a workaround I can suggest you setting a really big height for your page, laying out everything you want to wit in, recording the amount of space it took, manipulate page object to reflect the size. I can't give you the exact instructions for how to do that of top of my head. I just ccan tell you that you probably would need to get pretty deep into |
Just what I wanted to post 😄 - so here it goes: You could probably use a a very large height for your document so that prawn doesn't automatically create a new one. And once you are finished with everything, use Then you can use
|
@gettalong Thanks! It turned out much simpler than I anticipated. 😅 |
@vonchristian I will close this issue now. Feel free to reopen if you think this issue is not resolved for you. |
Thank! in my case, i use class |
Thank you, works splendidly! Any suggestions on how to determine the width (right-most I don't think I can do this with |
Im using prawn to generate receipts and the height of the page is unknown because it depends on how many items a customer purchases.
The text was updated successfully, but these errors were encountered: