AirPrint

RSS for tag

AirPrint allows photo and document printing in your iOS apps and macOS apps without the need to download or install drivers.

Posts under AirPrint tag

68 Posts

Post

Replies

Boosts

Views

Activity

Are Apple PDEs (Printer Dialog Extensions) a Legacy Technology?
As the title says I wonder if PDEs are still supported in Mac OS or if there are alternatives to accomplish the same function. In the current Apple documentation I have not found anything relevant to other than old code examples. Anyway Looking at the printer drivers of various printer manufacturers (at least on Mac OS Catalina), it seems that PDEs are still widely used in Mac OS. Any hint to the correct documentation would be appreciated.
0
0
1.1k
Feb ’22
Managed vs Local Printer
I am developing an app that will install and manage network printers. The app installs the printers using the lpadmin tool. Now, we have a customer that uses MDM profile for devices. The profile has the setting "showOnlyManagedPrinter" set to disallow installation of local printers. The customer wants our app to be able to install printers though. The result is that the printers can be installed with the app but will not show up in dialogs, etc. (For example the Printer & Scanners dialog). This causes a problem for them. My question is, is there a way to "fool" macOS to treat these printers as "managed" printers and show them. For example is there a flag or setting that you can apply when you install or post-installation of a printer. How does the OS decide which printers are managed or not?
0
0
1.1k
Jan ’22
Can't debug Xcode crash log
I have a problem with debuging crash log. I have tried debuging it in Xcode, but it is not pointing to any line of code. I don't know how to debug it. It crashed only on iPad (It crashed to some user in production). I think it is regarding PrintKit on thread 0. Can please someone help me? Thanks in advance Code for displaying PrintController: if UIPrintInteractionController.canPrint(pdfURL) {             let printInfo = UIPrintInfo(dictionary: nil)             printInfo.jobName = pdfURL.lastPathComponent             printInfo.outputType = .general             let printController = UIPrintInteractionController.shared             printController.printInfo = printInfo             printController.showsNumberOfCopies = false             printController.printingItem = pdfURL             printController.present(animated: true, completionHandler: nil)         } Crash log: Incident Identifier: INCIDENT ID Hardware Model: iPad13,2 Process: **APP-NAME** [89317] Path: /private/var/containers/Bundle/Application/**ID**/**APP-NAME**.app/**APP-NAME** Identifier: BUNDLE ID Version: 1.0 (4) AppStoreTools: 13C88a AppVariant: 1:iPad13,2:15 Code Type: ARM-64 (Native) Role: Background Parent Process: launchd [1] Coalition: BUNDLE ID Date/Time: 2022-01-05 09:09:35.5332 +0000 Launch Time: 2022-01-05 07:15:54.2451 +0000 OS Version: iPhone OS 15.1 (19B74) Release Type: User Baseband Version: 3.00.00 Report Version: 104 Exception Type: EXC_CRASH (SIGKILL) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Triggered by Thread: 0 Thread 0 name: Thread 0 Crashed: 0 libsystem_kernel.dylib 0x00000001b97c3558 semaphore_timedwait_trap + 8 1 libdispatch.dylib 0x00000001831ccc6c _dispatch_sema4_timedwait + 64 (lock.c:154) 2 libdispatch.dylib 0x00000001831cd270 _dispatch_semaphore_wait_slow + 76 (semaphore.c:116) 3 PrintKit 0x00000001e4adf548 -[PK_HTTPProxy withProtocolSync:] + 252 (PKBonjour.m:232) 4 PrintKit 0x00000001e4adfa94 pk_proxyConnectHTTP + 572 (PKBonjour.m:264) 5 PrintKit 0x00000001e4af4a34 -[PKPrinter(PKPrinterPrivate) getAttributes:count:] + 240 (PKPrinter.m:2744) 6 PrintKit 0x00000001e4af1004 -[PKPrinter doMedia2:] + 84 (PKPrinter.m:1542) 7 PrintKit 0x00000001e4aee88c -[PKPrinter printInfoSupported] + 1216 (PKPrinter.m:969) 8 UIKitCore 0x000000018687ed04 -[UIPrinterUtilityTableViewController initWithPrinter:] + 588 (UIPrinterUtilityTableViewController.m:230) 9 UIKitCore 0x000000018687254c -[UIPrinterBrowserViewController printerInfoButtonTapped:] + 80 (UIPrinterBrowserViewController.m:578) 10 UIKitCore 0x0000000186871340 -[UIPrinterTableViewCell printerAccessoryViewInfoButtonPressed:] + 84 (UIPrinterBrowserViewController.m:327) 11 UIKitCore 0x000000018687054c -[UIPrinterAccessoryView infoButtonPressed:] + 92 (UIPrinterBrowserViewController.m:124) 12 UIKitCore 0x0000000185e2fbf0 -[UIApplication sendAction:to:from:forEvent:] + 100 (UIApplication.m:5360) 13 UIKitCore 0x0000000185f5ba4c -[UIControl sendAction:to:forEvent:] + 128 (UIControl.m:871) 14 UIKitCore 0x0000000185cd72c8 -[UIControl _sendActionsForEvents:withEvent:] + 352 (UIControl.m:942) 15 UIKitCore 0x0000000185d73ae0 -[UIButton _sendActionsForEvents:withEvent:] + 160 (UIButton.m:4142) 16 UIKitCore 0x00000001860067c0 -[UIControl touchesEnded:withEvent:] + 536 (UIControl.m:637) 17 UIKitCore 0x0000000185acbd40 _UIGestureEnvironmentUpdate + 6708 (UIGestureEnvironment.m:653) 18 UIKitCore 0x0000000185afe8c8 -[UIGestureEnvironment _updateForEvent:window:] + 784 (UIGestureEnvironment.m:1332) 19 UIKitCore 0x0000000185b0ba68 -[UIWindow sendEvent:] + 4428 (UIWindow.m:3265) 20 UIKitCore 0x0000000185cbb318 -[UIApplication sendEvent:] + 828 (UIApplication.m:11864) 21 UIKitCore 0x0000000185adec30 __dispatchPreprocessedEventFromEventQueue + 7904 (UIEventDispatcher.m:2290) 22 UIKitCore 0x0000000185ad3a1c __processEventQueue + 6760 (UIEventDispatcher.m:2597) 23 UIKitCore 0x0000000185ad8ec8 __eventFetcherSourceCallback + 172 (UIEventDispatcher.m:2669) 24 CoreFoundation 0x000000018357c020 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1972) 25 CoreFoundation 0x000000018358cce0 __CFRunLoopDoSource0 + 208 (CFRunLoop.c:2016) 26 CoreFoundation 0x00000001834c6fe8 __CFRunLoopDoSources0 + 268 (CFRunLoop.c:2053) 27 CoreFoundation 0x00000001834cc7f4 __CFRunLoopRun + 820 (CFRunLoop.c:2951) 28 CoreFoundation 0x00000001834e03b8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268) 29 GraphicsServices 0x000000019ee7038c GSEventRunModal + 164 (GSEvent.c:2200) 30 UIKitCore 0x0000000185e806a8 -[UIApplication _run] + 1100 (UIApplication.m:3493) 31 UIKitCore 0x0000000185bff7f4 UIApplicationMain + 2092 (UIApplication.m:5046) 32 SwiftUI 0x000000018b143258 closure #1 in KitRendererCommon(_:) + 164 (UIKitApp.swift:35) 33 SwiftUI 0x000000018b071534 runApp<A>(_:) + 252 (<compiler-generated>:0) 34 SwiftUI 0x000000018b052cb4 static App.main() + 128 (App.swift:114) 35 **APP-NAME** 0x0000000100fa08f0 $main + 28 (<compiler-generated>:10) 36 **APP-NAME** 0x0000000100fa08f0 main + 40 (TLContact.swift:0) 37 dyld 0x0000000101185a24 start + 520 (dyldMain.cpp:876) EOF
0
0
1.2k
Jan ’22
com.apple.UIKit.UIPrintInteractionController.printPreviewGeneration (QOS: UNSPECIFIED) EXC_BREAKPOINT 0x00000001808a5ad0
4 ShareSheet 0x668b0 __38-[SHSheetMainInteractor _runActivity:]_block_invoke + 60 5 ShareSheet 0x739ec -[SHSheetActivityPerformer _completePerformingActivityWithState:returnedItems:error:] + 812 6 ShareSheet 0x73270 __57-[SHSheetActivityPerformer performWithCompletionHandler:]_block_invoke + 100 7 ShareSheet 0x3a740 -[UIActivity activityDidFinish:items:error:] + 184 8 ShareSheet 0x86524 __41-[UIOpenInIBooksActivity performActivity]_block_invoke + 244 9 UIKitCore 0xf32198 __61-[UIPrintInteractionController _endPrintJobWithAction:error:]_block_invoke + 432 10 Foundation 0x1793a0 -[_NSBarrierOperation main] + 76 11 Foundation 0x3b6f4 NSOPERATION_IS_INVOKING_MAIN + 24
0
0
988
Jan ’22
UIPrinterPickerController, UIPrintInteractionController, UIPrinter do not work on macOS Catalyst
On iOS emulator :I can select a printer from the UIPrinterPickerController dialog and retrieve the printer I can connect to that printer with UIPrinter.contactPrinter I can send multiple jobs to that printer silently (no dialog) with UIPrintInteractionController Same code or any similar code on macOS Catalyst :Absolutely nothing is working. I see nothing, no dialog, no errors in the log.
8
1
3.6k
Jan ’22
Big printer troubles since Big Sur 11.6
My printer a Samsung, seem to have totally lost the plot. It would not print anymore but only spit out ASCII type mambojambo. But there is no logic to it as the same file could come out wrong and on the next print fine. I would appreciate if apple would be a little bit more sensitive that not only their world exists but also other devices that need to connect and work.
0
0
706
Nov ’21
Experimental WebKit Features @page CSS at-rule support not working
Hello, With the new iPadOS updates in iPadOS15 we are finally able to print in landscape so my company is trying to migrate our POS systems to tablets as it makes our client experience more seamless. We have designed a coded template for a web pages receipt that allows us to print in a specific format that fits our letterhead. We currently the following code in order to format the printer to automatically print in landscape from Chrome with 0 margin. @Page {Margin:0px orientation:landscape} On iPadOS, the page does not automatically orientate to Landscape in the print which is not the biggest issue, but the Margin:0px is not read even with the Safari>Advanced>Experimental Features>@page CSS at-rule support toggled on. We have attempted to restart the iPad in case it needed a reset to take effect but it still does not seem to follow the at-rule. Is this an issue others are having, or is there a workaround to adjust printout margin?
1
0
1.6k
Nov ’21
Are Apple PDEs (Printer Dialog Extensions) a Legacy Technology?
As the title says I wonder if PDEs are still supported in Mac OS or if there are alternatives to accomplish the same function. In the current Apple documentation I have not found anything relevant to other than old code examples. Anyway Looking at the printer drivers of various printer manufacturers (at least on Mac OS Catalina), it seems that PDEs are still widely used in Mac OS. Any hint to the correct documentation would be appreciated.
Replies
0
Boosts
0
Views
1.1k
Activity
Feb ’22
Managed vs Local Printer
I am developing an app that will install and manage network printers. The app installs the printers using the lpadmin tool. Now, we have a customer that uses MDM profile for devices. The profile has the setting "showOnlyManagedPrinter" set to disallow installation of local printers. The customer wants our app to be able to install printers though. The result is that the printers can be installed with the app but will not show up in dialogs, etc. (For example the Printer & Scanners dialog). This causes a problem for them. My question is, is there a way to "fool" macOS to treat these printers as "managed" printers and show them. For example is there a flag or setting that you can apply when you install or post-installation of a printer. How does the OS decide which printers are managed or not?
Replies
0
Boosts
0
Views
1.1k
Activity
Jan ’22
Can't debug Xcode crash log
I have a problem with debuging crash log. I have tried debuging it in Xcode, but it is not pointing to any line of code. I don't know how to debug it. It crashed only on iPad (It crashed to some user in production). I think it is regarding PrintKit on thread 0. Can please someone help me? Thanks in advance Code for displaying PrintController: if UIPrintInteractionController.canPrint(pdfURL) {             let printInfo = UIPrintInfo(dictionary: nil)             printInfo.jobName = pdfURL.lastPathComponent             printInfo.outputType = .general             let printController = UIPrintInteractionController.shared             printController.printInfo = printInfo             printController.showsNumberOfCopies = false             printController.printingItem = pdfURL             printController.present(animated: true, completionHandler: nil)         } Crash log: Incident Identifier: INCIDENT ID Hardware Model: iPad13,2 Process: **APP-NAME** [89317] Path: /private/var/containers/Bundle/Application/**ID**/**APP-NAME**.app/**APP-NAME** Identifier: BUNDLE ID Version: 1.0 (4) AppStoreTools: 13C88a AppVariant: 1:iPad13,2:15 Code Type: ARM-64 (Native) Role: Background Parent Process: launchd [1] Coalition: BUNDLE ID Date/Time: 2022-01-05 09:09:35.5332 +0000 Launch Time: 2022-01-05 07:15:54.2451 +0000 OS Version: iPhone OS 15.1 (19B74) Release Type: User Baseband Version: 3.00.00 Report Version: 104 Exception Type: EXC_CRASH (SIGKILL) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Triggered by Thread: 0 Thread 0 name: Thread 0 Crashed: 0 libsystem_kernel.dylib 0x00000001b97c3558 semaphore_timedwait_trap + 8 1 libdispatch.dylib 0x00000001831ccc6c _dispatch_sema4_timedwait + 64 (lock.c:154) 2 libdispatch.dylib 0x00000001831cd270 _dispatch_semaphore_wait_slow + 76 (semaphore.c:116) 3 PrintKit 0x00000001e4adf548 -[PK_HTTPProxy withProtocolSync:] + 252 (PKBonjour.m:232) 4 PrintKit 0x00000001e4adfa94 pk_proxyConnectHTTP + 572 (PKBonjour.m:264) 5 PrintKit 0x00000001e4af4a34 -[PKPrinter(PKPrinterPrivate) getAttributes:count:] + 240 (PKPrinter.m:2744) 6 PrintKit 0x00000001e4af1004 -[PKPrinter doMedia2:] + 84 (PKPrinter.m:1542) 7 PrintKit 0x00000001e4aee88c -[PKPrinter printInfoSupported] + 1216 (PKPrinter.m:969) 8 UIKitCore 0x000000018687ed04 -[UIPrinterUtilityTableViewController initWithPrinter:] + 588 (UIPrinterUtilityTableViewController.m:230) 9 UIKitCore 0x000000018687254c -[UIPrinterBrowserViewController printerInfoButtonTapped:] + 80 (UIPrinterBrowserViewController.m:578) 10 UIKitCore 0x0000000186871340 -[UIPrinterTableViewCell printerAccessoryViewInfoButtonPressed:] + 84 (UIPrinterBrowserViewController.m:327) 11 UIKitCore 0x000000018687054c -[UIPrinterAccessoryView infoButtonPressed:] + 92 (UIPrinterBrowserViewController.m:124) 12 UIKitCore 0x0000000185e2fbf0 -[UIApplication sendAction:to:from:forEvent:] + 100 (UIApplication.m:5360) 13 UIKitCore 0x0000000185f5ba4c -[UIControl sendAction:to:forEvent:] + 128 (UIControl.m:871) 14 UIKitCore 0x0000000185cd72c8 -[UIControl _sendActionsForEvents:withEvent:] + 352 (UIControl.m:942) 15 UIKitCore 0x0000000185d73ae0 -[UIButton _sendActionsForEvents:withEvent:] + 160 (UIButton.m:4142) 16 UIKitCore 0x00000001860067c0 -[UIControl touchesEnded:withEvent:] + 536 (UIControl.m:637) 17 UIKitCore 0x0000000185acbd40 _UIGestureEnvironmentUpdate + 6708 (UIGestureEnvironment.m:653) 18 UIKitCore 0x0000000185afe8c8 -[UIGestureEnvironment _updateForEvent:window:] + 784 (UIGestureEnvironment.m:1332) 19 UIKitCore 0x0000000185b0ba68 -[UIWindow sendEvent:] + 4428 (UIWindow.m:3265) 20 UIKitCore 0x0000000185cbb318 -[UIApplication sendEvent:] + 828 (UIApplication.m:11864) 21 UIKitCore 0x0000000185adec30 __dispatchPreprocessedEventFromEventQueue + 7904 (UIEventDispatcher.m:2290) 22 UIKitCore 0x0000000185ad3a1c __processEventQueue + 6760 (UIEventDispatcher.m:2597) 23 UIKitCore 0x0000000185ad8ec8 __eventFetcherSourceCallback + 172 (UIEventDispatcher.m:2669) 24 CoreFoundation 0x000000018357c020 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1972) 25 CoreFoundation 0x000000018358cce0 __CFRunLoopDoSource0 + 208 (CFRunLoop.c:2016) 26 CoreFoundation 0x00000001834c6fe8 __CFRunLoopDoSources0 + 268 (CFRunLoop.c:2053) 27 CoreFoundation 0x00000001834cc7f4 __CFRunLoopRun + 820 (CFRunLoop.c:2951) 28 CoreFoundation 0x00000001834e03b8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268) 29 GraphicsServices 0x000000019ee7038c GSEventRunModal + 164 (GSEvent.c:2200) 30 UIKitCore 0x0000000185e806a8 -[UIApplication _run] + 1100 (UIApplication.m:3493) 31 UIKitCore 0x0000000185bff7f4 UIApplicationMain + 2092 (UIApplication.m:5046) 32 SwiftUI 0x000000018b143258 closure #1 in KitRendererCommon(_:) + 164 (UIKitApp.swift:35) 33 SwiftUI 0x000000018b071534 runApp<A>(_:) + 252 (<compiler-generated>:0) 34 SwiftUI 0x000000018b052cb4 static App.main() + 128 (App.swift:114) 35 **APP-NAME** 0x0000000100fa08f0 $main + 28 (<compiler-generated>:10) 36 **APP-NAME** 0x0000000100fa08f0 main + 40 (TLContact.swift:0) 37 dyld 0x0000000101185a24 start + 520 (dyldMain.cpp:876) EOF
Replies
0
Boosts
0
Views
1.2k
Activity
Jan ’22
com.apple.UIKit.UIPrintInteractionController.printPreviewGeneration (QOS: UNSPECIFIED) EXC_BREAKPOINT 0x00000001808a5ad0
4 ShareSheet 0x668b0 __38-[SHSheetMainInteractor _runActivity:]_block_invoke + 60 5 ShareSheet 0x739ec -[SHSheetActivityPerformer _completePerformingActivityWithState:returnedItems:error:] + 812 6 ShareSheet 0x73270 __57-[SHSheetActivityPerformer performWithCompletionHandler:]_block_invoke + 100 7 ShareSheet 0x3a740 -[UIActivity activityDidFinish:items:error:] + 184 8 ShareSheet 0x86524 __41-[UIOpenInIBooksActivity performActivity]_block_invoke + 244 9 UIKitCore 0xf32198 __61-[UIPrintInteractionController _endPrintJobWithAction:error:]_block_invoke + 432 10 Foundation 0x1793a0 -[_NSBarrierOperation main] + 76 11 Foundation 0x3b6f4 NSOPERATION_IS_INVOKING_MAIN + 24
Replies
0
Boosts
0
Views
988
Activity
Jan ’22
UIPrinterPickerController, UIPrintInteractionController, UIPrinter do not work on macOS Catalyst
On iOS emulator :I can select a printer from the UIPrinterPickerController dialog and retrieve the printer I can connect to that printer with UIPrinter.contactPrinter I can send multiple jobs to that printer silently (no dialog) with UIPrintInteractionController Same code or any similar code on macOS Catalyst :Absolutely nothing is working. I see nothing, no dialog, no errors in the log.
Replies
8
Boosts
1
Views
3.6k
Activity
Jan ’22
Big printer troubles since Big Sur 11.6
My printer a Samsung, seem to have totally lost the plot. It would not print anymore but only spit out ASCII type mambojambo. But there is no logic to it as the same file could come out wrong and on the next print fine. I would appreciate if apple would be a little bit more sensitive that not only their world exists but also other devices that need to connect and work.
Replies
0
Boosts
0
Views
706
Activity
Nov ’21
Experimental WebKit Features @page CSS at-rule support not working
Hello, With the new iPadOS updates in iPadOS15 we are finally able to print in landscape so my company is trying to migrate our POS systems to tablets as it makes our client experience more seamless. We have designed a coded template for a web pages receipt that allows us to print in a specific format that fits our letterhead. We currently the following code in order to format the printer to automatically print in landscape from Chrome with 0 margin. @Page {Margin:0px orientation:landscape} On iPadOS, the page does not automatically orientate to Landscape in the print which is not the biggest issue, but the Margin:0px is not read even with the Safari>Advanced>Experimental Features>@page CSS at-rule support toggled on. We have attempted to restart the iPad in case it needed a reset to take effect but it still does not seem to follow the at-rule. Is this an issue others are having, or is there a workaround to adjust printout margin?
Replies
1
Boosts
0
Views
1.6k
Activity
Nov ’21