Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It works fine on the browser but with electron there is no preview available #185

Open
StevieApp opened this issue Mar 5, 2024 · 0 comments

Comments

@StevieApp
Copy link

Describe the bug
Works fine when I'm running on browser, displays preview and prints

To Reproduce
Just install the package

then run the electron js file as such

const { app, BrowserWindow } = require('electron')
require('./server')

let win;

function createWindow () {
  // Create the browser window.
  win = new BrowserWindow({
    width: 1900, 
    height: 1320,
    backgroundColor: '#ffffff',
    icon: `./www/assets/icon/favicon.png`,
    autoHideMenuBar: true,
  })


  win.loadURL(`${__dirname}/www/index.html`)

  //// uncomment below to open the DevTools.
  // win.webContents.openDevTools()

  // Event when the window is closed.
  // --icon=assets/icon/favicon.png
  win.on('closed', function () {
    win = null
  })
}

// Create window on electron intialization
app.on('ready', createWindow)

// Quit when all windows are closed.
app.on('window-all-closed', function () {

  // On macOS specific close process
  if (process.platform !== 'darwin') {
    app.quit()
  }
})

app.on('activate', function () {
  // macOS specific close process
  if (win === null) {
    createWindow()
  }
})

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.
Screenshot 2024-03-05 045449

Ngx-Print Version
^1.5.1

Desktop (please complete the following information):

  • OS: Windows

Additional context
Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant