Last post Apr 16, 2012 04:36 PM by rado_
Apr 16, 2012 11:43 AM|golfin86|LINK
I have Adobe Distiller installed and references added but still can't print to PDF. I have tried printing from postscripct to PDF and straight to PDF. Everything I have tried doesn't even create the PDF file on the drive, let alone print the page.
Most of the code is commented as I have tried it and it didn't work.
Dim file as string
Dim Distiller6 as new PDFDistiller
Dim fileName as string
file = "C:\Folder\MyPDF.pdf"
fileName = "C:\PSFolder\MyPDF.ps"
'Distiller6.FileToPDF(Me.Page.ToString, file, "No")
'Distiller6.FileToPDF(Me.Page.Session.Contents.ToString, file, "No")
'Distiller6.FileToPDF(Me.Page.CreateHtmlTextWriter(IOTextWriter), file, "No")
'Distiller6.FileToPDF(fileName, file, "No")
Any insight would be helpful.
Apr 16, 2012 11:55 AM|bbcompent1|LINK
I would suggest using PDF Sharp as it is an actual asp.net library. You'll find it also has an easy to follow API.
Apr 16, 2012 04:36 PM|rado_|LINK
Here's a complete example of generating pdf with asp.net MVC - http://www.codeproject.com/Articles/86822/Generate-Popup-PDF-Forms-with-ASP-NET-MVC-and-Open
Hope it helps!