PB2019R3
Windows 10, 64 bit platform
Here's how I declare the file to be opened; ls_path = "Q:\CABSv4\PDF_Notices"
// Change to the target folder
ls_current = GetCurrentDirectory ()
ll_rc = ChangeDirectory (ls_path)
// ================================================================
// If we have a PDF Notice then we have to use a temporary filename
// for the invoice. This is because the final invoice needs to have
// the PDF Notice MERGED with the invoice file, and our tool PDFtk
// does not allow the final output file to be the name of either
// input file.
// ================================================================
IF (ls_notice_type = 'P') THEN
// Save the final invoice path & file
ls_final_pdf_filename = ls_final_path + ls_invoice_filename + ".pdf"
// Set the temp invoice filename
ls_invoice_filename = ls_path + ls_invoice_filename + "_temp.pdf"
lb_valid = FileExists (ls_invoice_filename)
IF (lb_valid) THEN
lb_valid = FileDelete (ls_invoice_filename)
END IF
END IF
// ------------------------------------------------------------------
// OKnight, 22-APR-2005. TD #64. Added "ls_ban" to the job name.
// ls_invoice_filename = "Q:\CABSv4\PDF_Notices\035H-035HD0222E-D0222E220907_temp.pdf
il_PrintJobId = PrintOpen (ls_invoice_filename)
<..... code happens ....>
// At this point ls_path and ls_invoice_filename have not changed
ll_rc = PrintClose(il_PrintJobId)
And the file is created in "C:\Personal\Test" !!!!!!!!!!
How can I get the file created in the folder I specified?
What controls the location of the file?
FYI: The current printer has a default folder of "C:\Personal\Test", but I thought the location of the file was controlled by the PrintJobName parameter of the FileOpen () function. Changing the default folder of the printer changes the location where the FileClose() function creates the file. I'm guessing that the folder used by the FileOpen/FileCLose functions is in a Windows Registry setting.