I have a VB.Net program which uses a third-party "print to file" object to create some TIFF files. This object is failing randomly (apparently randomly that is). Every so often it just prints a blank document (no errors, it's just blank). If I recreate the scenario exactly, it will run fine...usually. Bottom line is that I want to abandon this 3rd party tool and just use pure .NET to do the job. I don't know how though.
I've posted the essential code below of how I use this defective "ImageConverter" object. How can I swap this out for pure .NET and still get a TIFF image (yes, it must be a TIFF file)?
Dim WithEvents PrintDoc As New System.Drawing.Printing.PrintDocument
Dim ImageConverter As New badPDFPrinter
.OutputFormat = badPDFOutputFormatEnum.TIFFG32d
.Settings.OpenDocumentAfterCreation = False
PrintDoc.PrinterSettings.PrinterName = ImageConverter.PrinterName
ImageConverter.WaitUntilDocumentIsPrinted() 'prevents the biopdf user interface from launching