dart_pdf
dart_pdf copied to clipboard
Printer settings for desktop
Is there a way to show Printer settings panel for desktop app? My application is a desktop application.. I use print.directprintpdf () for printing, but I need a feature called "Printer Settings" that displays the printer Settings without printing Is there a way to implement it? Thank you for any reply
Yes this can be implemented for all 3 desktop OS.
Yes this can be implemented for all 3 desktop OS.
That is great!
I known it is ok for windows, but on macOS, I don't know how to do it.
I followed your plugin's implementation, but it is not what I want .
There seems to be no way to convert the print button to Confirm.
code:
public func showPrinterSettings(printer: String, withWindow window: NSWindow) -> Void {
let sharedInfo = NSPrintInfo.shared
let sharedDict = sharedInfo.dictionary()
let printInfoDict = NSMutableDictionary(dictionary: sharedDict)
let printInfo = NSPrintInfo(dictionary: printInfoDict as! [NSPrintInfo.AttributeKey: Any])
// Print the custom view
printOperation = NSPrintOperation(view: self, printInfo: printInfo)
printOperation!.jobTitle = "@@@@@@TEST"
printOperation!.printPanel.options = [.showsPreview]
printInfo.printer = NSPrinter(name: printer)!
printOperation!.showsPrintPanel = true
printOperation!.showsProgressPanel = false
printOperation!.printPanel.options = [.showsPreview, .showsPaperSize, .showsOrientation]
printOperation!.runModal(for: window, delegate: self, didRun:#selector(printOperationDidRun(printOperation:success:contextInfo:)), contextInfo: nil)
}
The Linux printing system is very similar to macOS, so it might not be possible too.
any solution @cuishijie1991 @DavBfr
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days
Closing this stale issue because it has no activity.