Comments (4)
hi @nurul-islam01,
did you try something like this?
import ptp from 'pdf-to-printer';
const options = {
win32: ['-view "single page"']
};
ptp
.print('assets/pdf-sample.pdf')
.then(console.log)
.catch(console.error);
We use SumatraPDF to print documents on Windows, so you can take a look at this page for all available options.
Let me know if it helps.
from pdf-to-printer.
@nurul-islam01 did you have a chance to check if it helps?
from pdf-to-printer.
@nurul-islam01 did you have a chance to check if it helps?
Error: Command failed: C:\inetpub\wwwroot\printer.backend\node_modules\pdf-to-printer\dist\SumatraPDF.exe -print-to-default -view "single page" -silent F:/PrinterServer/webPrintingQueue/1011219001_Nurul_Islam.pdf
at ChildProcess.exithandler (node:child_process:309:12)
at ChildProcess.emit (node:events:329:20)
at maybeClose (node:internal/child_process:1055:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:288:5) {
killed: false,
code: 1,
signal: null,
cmd: 'C:\inetpub\wwwroot\printer.backend\node_modules\pdf-to-printer\dist\SumatraPDF.exe -print-to-default -view "single page" -silent F:/PrinterServer/webPrintingQueue/1011219001_Nurul_Islam.pdf'
}
from pdf-to-printer.
I think you need this option:
win32: [
'-print-settings "simplex"'
]
from pdf-to-printer.
Related Issues (20)
- Question about defaultPrinter HOT 3
- Print multiple pages per sheet HOT 1
- Large PDF Size When Printing HOT 3
- Blank space at top of paper when printed HOT 5
- SumatraPDF.exe loading from dist_electron rather than node_modules/pdf-to-printer folder HOT 2
- Support paperSize A7 HOT 2
- Support PaperSize Halfletter HOT 6
- Bug: noscale + portrait print landscaped document HOT 2
- Printer response HOT 8
- win7 32bit print pdf throw error HOT 1
- Paper size required HOT 5
- Performance loss when multiple requests HOT 2
- Not working with 32 bit systems HOT 3
- Not working on Linux: Operating System Not Supported HOT 1
- [Feature Request] Add "PrinterPaperNames" property in getPrinters and getDefaultPrinter methods HOT 3
- Wrong's characters in Epson
- papersize, specified in mm does not work
- Obtaining garbled characters when the printer name contains Chinese
- Module not working with Windows 7 HOT 1
- Crash on getPrinters
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 pdf-to-printer.