Save to file name

Save to file name

Forum member · Aug 9, 2007
Hi, How does the file name of the PDF get set? MyDocument.DrawToWeb("Single Part Quotation.pdf") The above line of code writes the pdf to the web file, which is fine. But what sets the file name. When the user selects the save key in the explorer a filename appears like EstimateLetterPdf.pdf. Actaully the name of the form that creates the pdf is used. What sets this naming of the pdf? I can't find anything in the code Regards, Chaggers

Re: Save to file name

Support · Aug 9, 2007
Hello Chaggers, It will automatically inherit the filename of the aspx page as the name of the PDF document. In order to have control over the filename while saving the PDF, you will have to use the overloaded DrawToWeb constructor that takes filename and also forces the user to download the file by setting the forceDownload parameter to true; else it is not possible and the default name of the PDF will be the name of your class. public Void DrawToWeb(Page page, String downloadAsFileName, Boolean forceDownload) Thanks, ceTe Software Support Team.