Giter Site home page Giter Site logo

Comments (4)

artiebits avatar artiebits commented on June 12, 2024 1

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.

artiebits avatar artiebits commented on June 12, 2024

@nurul-islam01 did you have a chance to check if it helps?

from pdf-to-printer.

nurul-islam01 avatar nurul-islam01 commented on June 12, 2024

@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.

mcdado avatar mcdado commented on June 12, 2024

I think you need this option:

win32: [
    '-print-settings "simplex"'
]

from pdf-to-printer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.