NOTE: The other questions have not solved my problem.
I’ve got an PrintDocument object type and I would like to save its content in PDF format. Within the object already exists the .print () method, however when running this method shows up a box asking where to save the file. Instead, I need to save the generate file in a specific directory, without the need for the user to choose the name and location for the file.
PS. I tried to perform the procedure:How to skip the dialog of printing in printDocument.print() and print page directly? But can not. We came to create a file in the folder set with that name set, however the file creates empty and still appears the dialog box.