On Thu, 24 Sep 2020 16:38:50 GMT, Phil Race <p...@openjdk.org> wrote:
> A long-standing bug on macOS: https://bugs.openjdk.java.net/browse/JDK-7179006 > > The fix is to propagate whatever is set as the Destination down to native and > set it on the native printing object. > > Also if using the native dialog, but with attributes, copy back the > destination from native to the Java attribute set. > > The new test can directly test printing to file in an automated way - so long > as there is a printer. > > The updated manual test can be used to verify the cross-platform dialog case. src/java.desktop/macosx/native/libawt_lwawt/awt/CPrinterJob.m line 441: > 439: NSURL *nsURL = [NSURL fileURLWithPath:nsDestStr isDirectory:NO]; > 440: [printingDictionary setObject:nsURL forKey:NSPrintJobSavingURL]; > 441: // JNFCallVoidMethod(env, dstPrinterJob, jm_setPrintToFile, true); Does it look like the commented lines are not needed? ------------- PR: https://git.openjdk.java.net/jdk/pull/339