According to the documentation I can use the following VisualBasic code to export to JPEG:
Set Filter = document.ExportBitmap("C:\Temp\Doc.jpeg", cdrJPEG, cdrCurrentPage, cdrRGBColorImage, 0, 0, 72, 72)
With Filter
.Compression = 80
.Finish
End With
The question is if it possible to specify JPEG export preset in VisualBasic code? The default list of presets in upper right corner of the "Export to JPEG" filter dialog contains 'Original', 'High quality JPEG', 'Medium quality JPEG', 'Low quality JPEG', 'Custom', but I don't see a way to specify any of them automatically in VisualBasic without showing the filter dialog. I would expect something like
Set Filter = document.ExportBitmap("C:\Temp\Doc.jpeg", cdrJPEG, cdrCurrentPage, cdrRGBColorImage, 0, 0, 72, 72)
With Filter
.Preset="High quality JPEG"
.Finish
End With
But this does not work. Is there any way to do this?
Also in the "Export to JPEG" filter dialog there is the possibility to load the presets from xml file. Is it possible to do the same in VisualBasic code without showing the filter dialog?