ngx-print icon indicating copy to clipboard operation
ngx-print copied to clipboard

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

Open StevieApp opened this issue 11 months ago • 0 comments

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.

StevieApp avatar Mar 05 '24 01:03 StevieApp