VC++ : ProPrintExecute : need help/example
Hello All,
I am trying to export the current sheet of a drawing to either .pdf/tiff.
I am using ProPrintExecute.
Can someone please share a sample of this function?
My code is as below but it say: PRO_TK_BAD_INPUTS
int Window_Id;
ProError Status = ProWindowCurrentGet(&Window_Id);
ProPrintPrinterOpts* PrintOptions = new ProPrintPrinterOpts;
ProPrintMdlOpts* PrintMdlOptions = new ProPrintMdlOpts;
ProPrintPlacementOpts* PrintPlacementOptions = new ProPrintPlacementOpts;
PrintOptions->save_to_file = PRO_B_TRUE;
ProStringToWstring(PrintOptions->filename, "c:\\test\\test.pdf");
Status = ProPrintMdlOptionsGet(curMdl, PrintMdlOptions);
PrintMdlOptions->sheets = PRINT_SELECTED_SHEETS;
PrintMdlOptions->mdl = curMdl;
PrintMdlOptions->range[0] = 1;
PrintMdlOptions->range[1] = 1;
PrintMdlOptions->use_drawing_size = PRO_B_TRUE;
//PrintPlacementOptions->place_label = PRO_B_TRUE;
PrintPlacementOptions->scale = 1;
Status = ProPrintExecute(Window_Id, PrintOptions, PrintMdlOptions, PrintPlacementOptions);
// Here status becomes PRO_TK_BAD_INPUTS

