Diferences in PDF creation when debugging or running EXE

If you are a VB developer and have questions about using our products from VB, here is the place to post them.

Diferences in PDF creation when debugging or running EXE

Postby paulera on Fri Jan 12 2007

Hi there, this is my first post in this forum...

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]'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[/code]

Here goes a very weird trouble:
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?

Thanks!

Obs:
Visual Basic 6.0
Amyuni PDF Converter 2.05
Crystal reports 8
paulera
 
Posts: 5
Joined: Thu Jan 11 2007
Location: Brazil

Return to Visual Basic Community

Who is online

Users browsing this forum: No registered users and 1 guest

cron