Paper Width - Height

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
gabter74
Posts: 9
Joined: Fri May 02 2003

Paper Width - Height

Post by gabter74 »

Ther's no possibilities to know the Width and Height of a doc converted by PDFConverter on a Win9x Machine?
On NT platform, i use the GetJob function, but it doesen't work on win9x, because PDFConv doesen't spool the job.

Bye...
Dany
Amyuni Team
Posts: 113
Joined: Wed Sep 11 2002
Location: Montreal.
Contact:

Paper Width - Height (Workaround for Windows 9x)

Post by Dany »

I am assuming that you are using the event handler to get the JobID. If not you would need to setup an event handler to intercept the printer driver messages.

Under Windows 9x, you can use the hDC parameter instead of JobId, and use GetDeviceCaps( hDC, PHYSICALWIDTH ) and GetDeviceCaps( hDC, PHYSICALHEIGHT ) to get the width and height of the current page.

Note that you cannot use the hDC parameter on Windows 2000 unless the DLL that processes events runs in the same process as the printing application, so you need to stick to the JobID parameter.
gabter74
Posts: 9
Joined: Fri May 02 2003

Post subject: Paper Width - Height

Post by gabter74 »

Thanks for suggestion. I use GetDeviceCaps(hDC,DM_RASPRINTER + HORIZSIZE). This func doesn't return the mm of page set by the client application, but i can understand if the paper size is A4 or not.

In win NT the problem doesn't exists... GetJob() API make it all fine.

Ciao!
Post Reply