Home > Net >  C # call Microsoft print to PDF print PDF, how can not pop up the user interface (select files)
C # call Microsoft print to PDF print PDF, how can not pop up the user interface (select files)

Time:10-27

C # call Microsoft print to PDF print PDF, how can not pop up the user interface (select files)

CodePudding user response:

PrtDoc. PrinterSettings. PrintFileName="path you want to save"

CodePudding user response:

Setup will pop up after choosing file path of the page

CodePudding user response:

reference 1st floor wanghui0380 response:
prtDoc. PrinterSettings. PrintFileName="path you want to save"




Doc. PrinterSettings. PrintFileName=@ "D \ 1. PDF"; This setting can still play

CodePudding user response:

 enclosing printDocument1. PrinterSettings. PrinterName="Microsoft print to PDF"; 
Enclosing printDocument1. PrinterSettings. PrintToFile=true;
Enclosing printDocument1. PrinterSettings. PrintFileName=@ "d: \ test. PDF";
This. PrintDocument1. Print ();

CodePudding user response:

reference 4 floor wanghui0380 response:
 enclosing printDocument1. PrinterSettings. PrinterName="Microsoft print to PDF"; 
Enclosing printDocument1. PrinterSettings. PrintToFile=true;
Enclosing printDocument1. PrinterSettings. PrintFileName=@ "d: \ test. PDF";
This. PrintDocument1. Print ();




Why I set this error?

CodePudding user response:

Behind the path to write wrong, d are:

CodePudding user response:

The
refer to fifth floor fairy & amp; & Response:
Quote: refer to 4th floor wanghui0380 response:
 enclosing printDocument1. PrinterSettings. PrinterName="Microsoft print to PDF"; 
Enclosing printDocument1. PrinterSettings. PrintToFile=true;
Enclosing printDocument1. PrinterSettings. PrintFileName=@ "d: \ test. PDF";
This. PrintDocument1. Print ();




Why I set this error?

Path to write wrong, drive D behind with a colon:
  •  Tags:  
  • C#
  • Related