Questions tagged [printjs]

A tiny javascript library to help printing from the web.

Print.js is a tiny javascript library to help printing from the web. Print friendly support for HTML elements, image files and JSON data.

74 questions
0
votes
1 answer

How to generate one file minimized of printjs or another javascript library

I need to download a generated file (minimized or similar) of this library: https://github.com/crabbly/Print.js/tree/e42c350267e7c869387e8084b90119f86c7d70e2 How i can do it ? Thanks
Mickey
  • 173
  • 2
  • 11
0
votes
2 answers

Printing Page Section using PrintJS on vueJS

I have installed printJS on my vue project using npm install print-js --save Print Preview is now successfully displaying but the problem is that it is printing the whole page together with the side panel and the scroll bars. I have implemented it…
jdev
  • 31
  • 1
  • 11
0
votes
1 answer

Custom page margins using print.js

I am attempting to print payment receipt using thermal POS printer using Print.js library. I can successfully print the page using the printjs. But the print comes with extra margins as per A4 page. Is there any way to print it to fit to 58mm with…
Atharva Kale
  • 59
  • 1
  • 9
0
votes
1 answer

Print PDF File using Print.js

I'm having difficulties to show print modal passing a pdf file. setTimeout(() => { printJS({ printable: '53544.pdf', type: 'pdf', showModal: true, fallbackPrintable: () =>…
Hasunohana
  • 565
  • 8
  • 22
0
votes
1 answer

How to add custom JavaScript file on printJS

I have a script for printing the receipt and it works perfectly fine as well as the CSS file printJS({printable:'print-receipt', type:'html',css:'assets/css/receipt.css'}); But, when I try to add a JavaScript file with this following code i.e:…
Jesper Martinez
  • 611
  • 5
  • 15
0
votes
1 answer

Can we print a path-defined pdf using reactjs?

I want to print a pdf file which is obtained from GET request from router.js router.get('/fetch-pdf',(req,res) => { res.sendFile(`${__dirname}/result.pdf`) }) and my react component is like App.js import React from 'react' import axios from…
dnp_akil
  • 105
  • 1
  • 1
  • 5
0
votes
1 answer

Printing area not working properly in print js

I am trying to implementing POS printing using print js (https://printjs.crabbly.com/) . I am using it in laravel framework. It's working but I can not use any css effect on it. I also tried but not working . Here is my expected invoice format …
Mithun
  • 255
  • 1
  • 7
  • 17
0
votes
1 answer

Printing multiple files in angular

I have multiple blobs from which i am creating blob urls and using print-js library to show print preview screen of browser. I have async printDocuments(): Promise { const _files: { fileName: string, blob: any }[] = await this._getFiles(); …
Sunil Garg
  • 14,608
  • 25
  • 132
  • 189
0
votes
1 answer

How to give custom name when printjs library used

I am able to do print functionality using printjs but i want to give custom name which i failed to do it.Any suggestions would help me to achieve this.
sowmya
  • 221
  • 1
  • 3
  • 15
0
votes
1 answer

Printing 2 copies of html section without preview

This question may be simple. But i couldnt achieve this. I am using a library called print.js. Using that i am printing a html div from browser.i will use this webpage in an android tab. I have 2 issues. I wish to print 2 copies of the same in…
Surensiveaya
  • 297
  • 1
  • 12
0
votes
0 answers

raw html header with printjs?

I am using the print js library to export tables in my application. I need to put a header when exporting each page. Now when I use the json type as follows let someJSONdata = [{ name: 'name', email: "fda@daa.com", phone: "46228156" …
Jfunez
  • 1
  • 2
0
votes
1 answer

Using print-js with react

I'm new to React Js and i'm trying to print a file from a url using printJS. My intention is to access the DB and get a url of pdf file to print, and then print it (without opening a new page if possible). For testing, after returning with the url…
0
votes
0 answers

How to track the number of prints using javascript

If I use Print.js library to print my div like this:
Anyname Donotcare
  • 11,113
  • 66
  • 219
  • 392
0
votes
1 answer

Override css with printJS

I need the default bootstrap css left intact when printing a table with a fixed header, but need to override a couple of styles relating to overflow as the table is scrollable vertically. Basically I want targetStyles: ['*'] left in to match what…
0
votes
1 answer

Why does calling printJS() in the react component fail?

I tried to call the printJS in react Component,but it didn't work when i clicked the button.Then I modified the code look like this.
潘夏开
  • 39
  • 4