doersguild / jquery.print Goto Github PK
View Code? Open in Web Editor NEWEasy to use, Element Printing Plugin for jQuery
Home Page: http://doersguild.github.io/jQuery.print
License: Other
Easy to use, Element Printing Plugin for jQuery
Home Page: http://doersguild.github.io/jQuery.print
License: Other
I have a div. I have clone the div multiple times. when I print only one div showing in print. Need help.
Can i print without dialog window
hi
i am using your plugin. best of all
but today i found what my not printing
and when i use plugin
https://github.com/fronteed/iCheck/
then radio-boxes prints with artefacts
Excuse me
i don't want print preview selector, but want to save it automatically (don't show print preview). can help me
Hi, thanks for the great plugin!
I have two simple questions, since I don't have an printer, so I can't really test.
$('#print-content', #print-content2).print();
Thanks
The plugin has the deferred
option where you can pass a jQuery Deferred
object with multiple callback functions attached, which is always resolved after the actual printing has been triggered.
We should add in an example implementing a callback mechanism with this deferred
option, so that it is clear that people can use it and don't have to go through creating a PR for a callback option, like the kind folks at #50 and #54
First of alle - thanks for your work! It is a simple but nice plugin.
Do you think it is possibe to get a pagination done with it? I would like to auto-append "Page X of Y" at every new page.
Any ideas?
This is not an issue really, but I didn't find any other way to contact you.
Is it possible:
I have to print a page content who has bigger content in width want to print it in landscape mode by default but i am not able to find any option to print in landscape mode by default.
First of all - love what you done, has solved a problem I had with printing all content in a modal window - however kept getting Console error using
<button class="print-link" onclick="jquery.print('#sectiontoprint')">PRINT</button>
(index):368 Uncaught ReferenceError: jquery is not defined
My solution is
<button a href="javascript:void(0);" class="print-link">PRINT</button>
All works plus no Console error
When checking your demo it is console error free
Curious as to why I was getting the ReferenceError: jquery is not defined?
Hi!
I got a weird problem. I cannot print checked checkboxes. For example we got a list of bookings and there is a checkbox in each row to show if the booking has been paid or not.
When I try to print the list, none of the checkboxes are checked in the preview of the printer.
Does anybody know, why this is happening?
thx!
The demo doesnt work for me at http://jsfiddle.net/5V24U/27/
I tried downloading the files locally and same issue.. print buttons do nothing.
would you please consider adding package.json so that we can add your lib on https://cdnjs.com.
thank you very much!
cdnjs/cdnjs#5793
I am new with jQuery.print.
It look great, but i would like to set paper size and layout.
Pl help me.
.mapstyle {
height: 100%;
height: -webkit-calc(100% - 69px);
height: -moz-calc(100% - 69px);
height: calc(100% - 74px);
margin-left: 420px;
}
div id="map" class="mapstyle"
not show all map...
Could i print the element that disable?
Hello,
I have an issue when I use jQuery.print plugin.
When I click to button print, I have following errors :
Uncaught ReferenceError: jQuery is not defined
Uncaught ReferenceError: head is not defined
I think that messages appear because I print a div and in this div, the jQuery and head script are not included.
The script are included in head and not in the div.
It is possible to copy the script of head tag when print a portion of page?
Thanks
If I add this css :
<style>
@media print {
html, body {
height: 99%;
}
}
</style>
Its works, but is there a cleaner way?
Thanks
how to use this plugin to print the contents of a Zurb Foundation reveal modal?
Sir,
Using jQuery.print.js When printing a table including link [ one colomn as <a href="..." type] , In printing time the corresponding url is displayed on printing page.
I Want to avoid That Url.please help me
Thank you for great plugin - smart idea to inject content into iframe and print that.
Noticed some problems with Internet Explorer 9 not printing SVG paths and marker clusters with backgroundcolor: rgba()
and not handling border-radius correctly (while printing Leaflet.js maps using Leaflet-easy-print https://github.com/rowanwins/leaflet-easyPrint). I believe this is because IE9 requires HTML5 doctype to print these things.
Easy fix was to write the DOCTYPE before the content:
wdoc.open();
wdoc.write("<!DOCTYPE html>");
wdoc.write(content);
Considering pull request, but I dunno if IE9 support is big deal for you or not. Thoughts?
Dear sir,
I have implemented your print solution succesfully, great piece of work!
I would like to make a suggestion to add an option to set the orientation of the print to landscape or portrait.
Kind regards,
Jos de Nijs
Could I use this via nodejs?
So, I've setup things and it's working fine outside of iframe mode. However, in iframe mode, while it does add the iframe to the DOM, it doesn't trigger the print dialog. Any ideas?
I should mention that I'm using FF48.0a2
print a div contain a select dropdown show empty value
We are printing approx. 30 printed pages of HTML as PDF. It looks good until page 10, when we see the below and nothing else prints. On Chrome, with all the same code, it prints fine. FF also has a similar issue but sooner, at 3 pages. This is from Windows 7, jQuery 1.11, jQuery print 1.3.3. Any thoughts?
ERROR: invalidaccess
OFFENDING COMMAND: put
STACK:
/116
1
[/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /
quoteright /parenleft /parenright /asterisk
Hey guys, thank you for putting the plugin together. I have noticed both in development and in your own example page that when in iframe mode, the print screen will randomly be blank when printing. I was unable to track down what might be causing this. I am on Mac, El Capitan, Chrome v 48.0.2564.116.
Hello friend, I am using the script to print the contents of a div, the content is a form that is empty originally, then the user fills data and the idea is to print the form and with the data, but when printing, the print all empty fields, not working as a windows.print (). any solution for this?
Why are the urls of the links in html are shown in the print?
Thank you
Hello,
I have a separate CSS that I called using stylesheet option, it contains a rule that sets the background color of the table caption. Also, I have a chart (JQPlot Chart).
The problem now is when I print, the chart is blank.. only the tables, and the table caption background is not shown (I was expecting a blackground color with white text, but I only got white background with black text).
I do not know what to set to have it look like I wanted it to.
THanks
Printing in firefox 37 does not work.
Adding this code in the try-catch at line 132 makes it work again:
var printed = w.document.execCommand('print', false, null);
if (!printed) {
w.print();
}
I'm trying to use a CSS to make a page break. Follows suit:
HTML:
<a href="#" class="print">print</a>
<div id="print">
<div id="first">
content
</div>
<div id="second">
content
</div>
</div>
CSS:
@media print {
#first{
page-break-after: always;
}
}
I also tried
@media print {
#second{
page-break-before: always;
}
}
js
$(document).on('click','.print', function() {
$('#print').print();
});
Can you help me? Please.
Thank you
Trying to print a barcode with some Text values. But sometimes the print preview appears blank. Once I reload the page it works. Why is this happening? How to overcome this ?
Can we repeat some div on start of every page ?
Hi,
I found one issue with this plugin, Print preview doesn't show css style like background-image,transform,background colour etc. Please give me a soulution
Hi, I have included this code on my page and it will print what is on the page wonderfully, with one exception: I have a couple of textareas on the page that I need to put text into and have that print with the page, but the values will not get printed. Whatever values those textareas hold at page load (one of them has default values) WILL print, but if I make any changes to the content of those textareas, those will NOT print, only the original copy will. I have checked that manuallyCopyFormValues is set to true, but no luck. Any ideas?
Hello Print team,
I copied and pasted the code below in a html5 page but nothing happens. What am I missing.
We included the necessary script references.
<div id="ele1" class="a"> <h3>Element 1</h3> <p> Some random text. </p> <button class="print-link no-print" onclick="jQuery('#ele1').print()"> Print this </button> </div>
Kind regards,
Mario
I have table which have scroll. If i print that table then it doesnot handle scroll
When checking the demo around element4, you mixed up append with prepend. append
place the text/element after the conent, prepend
places on first place before the element.
Am using default options except I bumped timeout to 950. Printing in Chrome or IE 11 never goes past first page of the iFrame, the scrollbars are visible in print preview and also print but not any content beyond page 1. Any suggestions? Thanks.
It'd be a great addition to have the non-iframe mode open a new window and not a new tab. Also, setting the width/height of that window would be great.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.