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

How to make this plugin printing more than one page? #106

Closed
firmlab opened this issue Oct 8, 2019 · 7 comments
Closed

How to make this plugin printing more than one page? #106

firmlab opened this issue Oct 8, 2019 · 7 comments

Comments

@firmlab
Copy link

firmlab commented Oct 8, 2019

Hello, I'm stuck on printing long HTML, which is need more than one page.
How i can do that? I tried to print long HTML, but the result it's get cut.

@CitizenOfRome
Copy link

CitizenOfRome commented Oct 8, 2019 via email

@firmlab
Copy link
Author

firmlab commented Oct 8, 2019

Hi, thanks for the reply,

the print html is like this: https://jsfiddle.net/8e0yun6k/ but in here it's working fine.

i think you're right, the problem is because of there is css that restrict it's height.

i'm using framework7 popup and i put the HTML print template into it.

have you ever use framework7 before?
how to make this template override the restriction?

@CitizenOfRome
Copy link

CitizenOfRome commented Oct 8, 2019 via email

@firmlab
Copy link
Author

firmlab commented Oct 8, 2019

ah, i fixed it with globalStyles to false.

but is there any way to setup margin on each of print?
let say, i have 2 print template, one for receipt print and one for standard print, is there any option to set the margin only for standard print ?

@CitizenOfRome
Copy link

CitizenOfRome commented Oct 8, 2019 via email

@firmlab
Copy link
Author

firmlab commented Oct 8, 2019

like this one?

<style id="custom-style-print"> @page { margin: 0cm 0cm 0cm 0cm; } </style>

$('#print-registrasi-container').print({append: '#custom-style-print'});

@CitizenOfRome
Copy link

Sure, that could work but you may be better off using one of these options:

mediaPrint

  • Default: false
  • Acceptable-Values: Boolean
  • Function: Whether or not link tags with media='print' should be included; Over-riden by the globalStyles option

stylesheet

  • Default: null
  • Acceptable-Values: URL-string
  • Function: URL of an external stylesheet to be included

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

2 participants