PDF resolution problem

The Amyuni PDF Converter is our Printer Driver that enables you to convert any documents to PDF format. If you have any questions about installing and using the Amyuni PDF Converter please post them here.
Post Reply
mauribon
Posts: 11
Joined: Mon Oct 18 2004

PDF resolution problem

Post by mauribon »

I am trying to use Amyuni PDF Converter 2.50 to convert some CAD drawings in PDF .
If I convert them by using the print command from within the CAD application, and choose Amyuni as printer, the result is OK.
I have created an application in VB6 that can export the pdf file from a user interface, and I have referenced it to Amyuni DLL Activex.
Here is part of the code:

Dim PDFPrinter As New CDIntfEx.CDIntfEx

Const NoPrompt As Integer = 1
Const UseFileName As Integer = 2

PDFPrinter.DriverInit "PlotGbgPDF"

PDFPrinter.EnablePrinter AMY_USER, AMY_SERIAL ' These are constants
PDFPrinter.PaperSize = vbPRPSA3
PDFPrinter.Orientation = vbPRORLandscape
PDFPrinter.Resolution = 600
PDFPrinter.FileNameOptions = NoPrompt + UseFileName
PDFPrinter.DefaultFileName = "c:\temp\prova.pdf" '-> This is an example

'This is the print command
nVal = Shell(psDirProg & "\bin\gbplo.exe -ini " & App.Path & "\PlotGBG1.ini " & "-FER C:\NUL -GRA ODVT 'MWPRINTER:PlotGbgPDF' -GRA FORMD A3 -L 1 5 -S O -W O -GRA MWIDTH 2 -F '" & lstScelte.List(0) & "'")

PDFPrinter.FileNameOptions = 0
PDFPrinter.DriverEnd
Set PDFPrinter = Nothing

The PDF file is created correctly, but the resolution is lower than the one created with the interactive method.
Looking at the properties (resolution, paper size, orientation, etc.), I can't see any difference between the two methods.
Have you any suggestions.
Thank you in advance.
Best regards.
M.Bonaga
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

This is a common issue. You need to call SetDefaultConfig after changing the printer properties, otherwise the other application will not take the changes into consideration.
Post Reply