My application sends a Crystal report direct to the printer, and I need to implement a PDF exporting option. So, when the user wants to generate PDF, I tried to do something like this:
Code: Select all
'Initialize the PDF printer Dim pdfprinter As New CDIntf.CDIntf pdfprinter.DriverInit("PDF Compatible Printer Driver") 'Configures printer pdfprinter.DefaultFileName = "c:\test.pdf" pdfprinter.FileNameOptions = 1 + 2 pdfprinter.SetDefaultConfig pdfprinter.SetDefaultPrinter 'Prints the document, doesn't matter how Call PrintMyDocument 'Restore default configuration pdfprinter.DefaultFileName = "" pdfprinter.FileNameOptions = 0 pdfprinter.SetDefaultConfig 'Finish the job pdfprinter.DriverEnd
I generate the PDF the way above. When running the application under the VB, the PDF is generated correctly. But, when I compile the EXE file and run it from Windows, the PDF comes with bigger fonts and wrong proportions.
I already tried to modify the properties Resolution, FontEmbedding and PageContentCompression, to reinstall the driver and call DriverInit("Amyuni PDF Converter") instead, nothing have worked.
Anyone have ever seen something like this?
Visual Basic 6.0
Amyuni PDF Converter 2.05
Crystal reports 8