Forcing filename of PDF for DrawToWeb

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for COM/ActiveX (v7)  /  Forcing filename of PDF for DrawToWeb

DynamicPDF CoreSuite for COM/ActiveX (v7) Forum

If you're using .NET then the DrawToWeb method is overloaded and you can specify the filename. This isn't the case in the Classic ASP/VBScript world. The following is the only way I managed to do it:

...
...
Response.ContentType = "application/pdf"
Response.AddHeader "content-disposition", "inline;filename=test.pdf"
ByteArray = DOC.Draw
Response.BinaryWrite ByteArray
...
...


Hope this helps someone.
Posted by a ceTe Software moderator
Hello,

Currently it is not possible to specify the file name using DrawToWeb method of the Document object. The above code can be used as a workaround to force the file name when the PDF is saved from the browser menu (File > “Save Page As”).

Thanks,
ceTe Software Support Team.

All times are US Eastern Standard time. The time now is 6:08 AM.