Comments (9)
@EricLease Cool. I'll take a look at it as soon as I have a chance.
from print.js.
Hey @EricLease , I had never take the time to look into this untill now. You branch looks great. I do however, want to keep using es6 let
for variables.
I know it is been a while, but if you could do a pull request for the page-break support, that would be great. Thank you.
from print.js.
I added support for page break with commit 163548d
Thank you @EricLease
from print.js.
so i already read this and try to add css page-break as the same as @EricLease
but, it seems like im doing it wrong,
the html that i write is like this
<div id="print>
<table>**content**</table>
<div class="page-break"></div>
<table>**content2**</table>
</div>
but when i print it, it doesnt do the page-break.
am i doing it right?
from print.js.
Hey @chocomail , did you create the class page-break
in your project?
from print.js.
uhm
do you mean create the class page-break
is create the css containing page-break?
i tried both, (create css page-break and not create), and not one of them is working.
am i already doing it right for the html?
if so, im afraid i must my other component in my project.
im adding codepen.
what i hope to happen is, the table no.2 is in another page.
https://codepen.io/anon/pen/qKOXNR
okay, as when im using the codepen, i found the one making it not working the page-break is targetStyles. Am i doing it wrong?
printJS({
maxWidth: 756,
targetStyles: [
"border",
"display",
"filter",
"height",
"left",
"padding",
"position",
"text-align",
"text-decoration",
"top",
"width",
"font",
"vertical-align",
"page-break"
],
type: "html",
printable: "print"
})
okay i found it again, must insert
page-break-after
page-break-inside
page-break-before
break-after
break-inside
break-before
inside targetStyles, strangely enough, in my computer when i use
targetStyles: ['*']
is not working.
thank you
from print.js.
Glad you figured it out.
You can just pass break
and it should works as well:
https://codepen.io/anon/pen/ZRbMMW
I'm not sure why targetStyles: ['*']
is not working. It must be a bug. I'll check on that.
Thank you.
from print.js.
I found the issue with targetStyles: ['*']
not responding. It has been fixed and pushed to npm.
from print.js.
Hey @crabbly ,
Your example on https://codepen.io/anon/pen/ZRbMMW
not working, maybe same update from Chrome?
from print.js.
Related Issues (20)
- Mobile Android and IOS chrome browser not working HOT 8
- mismatch version on NpmJS and Github after version of 1.6.0
- How to implement component SCSS files to print the HTML page with styles?
- how to remove the time and website, but keep the page number. HOT 2
- when I use firefox, the demo got blank HOT 4
- raw-html when img src is empty not working
- Title: Still get "Invalid HTML element id: [object NodeList]" when printing NodeList in v1.6.0
- type='json' footer not working
- how to remove UUID during save file? HOT 3
- vue中设置font-size不生效 HOT 3
- Printing a txt file?
- Printing HTML always overflow to next page HOT 1
- InstallTrigger to detect Firefox is deprecated
- Unable to print blob pdf under Safari (and probably other browser)
- Abandoned - please transfer ownership HOT 1
- Can't print with style HOT 1
- Printing PDF is not working when dev toolbar is opened
- Issue printing PDF using Firefox HOT 11
- Printing HTML and setting documentTitle,documentTitle is not worked.
- How do I monitor the print button
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from print.js.