When a PDF document is opened in Chrome, it may open using the Chrome PDF Viewer but it doesn’t always render correctly. If you open the PDF in the System Viewer it renders correctly. Is there a way to programmatically force Chrome to always open the PDF in the System Viewer? I know there is a setting in Chrome a user can set to do open in the System Viewer, but I prefer not rely on the user to change it I prefer to do it programmatically. Below is my code.
'Save the document
Dim converter As Aspose.Pdf.Facades.PdfConverter = New Aspose.Pdf.Facades.PdfConverter
Dim pdfSettings As New Aspose.Pdf.Devices.TiffSettings
Dim pdfResolution As New Aspose.Pdf.Devices.Resolution(200)
pdfSettings.Compression = Aspose.Pdf.Devices.CompressionType.CCITT4
pdfSettings.Depth = Aspose.Pdf.Devices.ColorDepth.Format1bpp
converter.BindPdf(savePDFPath & savePDFName)
converter.Resolution = pdfResolution
If isPageLandscape = True Then
converter.SaveAsTIFF(savePDFPath & saveTIFName, 2200, 1700, pdfSettings)
Else
converter.SaveAsTIFF(savePDFPath & saveTIFName, 1700, 2200, pdfSettings)
End If
converter.Close()
pdfSettings = Nothing
converter = Nothing
Dim pdfDocument As Aspose.Pdf.Document = New Aspose.Pdf.Document(savePDFPath & savePDFName)
Kill(savePDFPath & savePDFName)
Dim pdfSaveOptions As Aspose.Pdf.SaveOptions = New Aspose.Pdf.PdfSaveOptions
pdfDocument.Save(Response, clientPDFName, Aspose.Pdf.ContentDisposition.Attachment, pdfSaveOptions)