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

7179006: [macosx] Print-to-file doesn't work: printing to the default printer instead. #339

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -318,6 +318,7 @@ static void nsPrintInfoToJavaPrinterJob(JNIEnv* env, NSPrintInfo* src, jobject d
static JNF_MEMBER_CACHE(jm_setPrintToFile, sjc_CPrinterJob, "setPrintToFile", "(Z)V");
static JNF_MEMBER_CACHE(jm_setDestinationFile, sjc_CPrinterJob, "setDestinationFile", "(Ljava/lang/String;)V");

// get the selected printer's name, and set the appropriate PrintService on the Java side
NSString *name = [[src printer] name];
jstring printerName = JNFNSToJavaString(env, name);
JNFCallVoidMethod(env, dstPrinterJob, jm_setService, printerName);
@@ -334,7 +335,6 @@ static void nsPrintInfoToJavaPrinterJob(JNIEnv* env, NSPrintInfo* src, jobject d
JNFCallVoidMethod(env, dstPrinterJob, jm_setPrintToFile, false);
}

// get the selected printer's name, and set the appropriate PrintService on the Java side
NSNumber* nsCopies = [printingDictionary objectForKey:NSPrintCopies];
if ([nsCopies respondsToSelector:@selector(integerValue)])
{