Jump to content

Bit OT: Howto select a different printer driver for FreePDF-XP


rudi
 Share

Recommended Posts

Hi.

This is a bit off topic, as it's basically a windows tweak question. :) But as I can't figure out howto, I'd appreciate any help. Maybe I missed to search for the right words to find other postings here covering my questions? :)

I wrote an autoit install wrapper for FreePDF XP. It's installing automatically Ghostscript and Freepdfxp.

FreePDF XP is using by default the Apple Laserwriter printer driver. That one is limited to DIN A3 (297*420mm) in size.

Ghostscript is coming with a printer driver "ghostpdf" (<gs-folder>\lib\ghostpdf.inf) that can print up to Din A0 (841*1189mm).

I do know how to change this in the printer object (WinXP), but I'd like to know, if there is a more direct way to

1.) install the ghostpdf driver silently,

2.) then to select that driver within the FreePDF printer object.

TIA

Regards, Rudi.

Edit: Perhaps I should tell, that I tried these lines for Q1, but it fails:

$gsDir=@ProgramFilesDir & "\gs\gs8.54\lib"
$GhostPDF_INF=$gsDir & "\ghostpdf.inf"

$result=RunWait(@SystemDir & '\rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 "' & $GhostPDF_INF & '"',$gsDir)
ConsoleWrite($result & ", " & @error & ", " & @extended & @CRLF)

Result: a popup window telling "Installation failed" and for the consolewrite a 0, 0, 0.

Regards, Rudi.

Edited by rudi

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Link to comment
Share on other sites

Hi.

Just found A1:

$gsDir=@ProgramFilesDir & "\gs\gs8.54\lib"
$GhostPDF_INF=$gsDir & "\ghostpdf.inf"

$runstring= "rundll32 printui.dll,PrintUIEntry /c\\" & @ComputerName & " /ia /m ""Ghostscript PDF"" /f """ & $GhostPDF_INF & '"' 
$result=runwait($runstring,$gsDir)
ConsoleWrite($result & ", " & @error & ", " & @extended & @CRLF)

So there remains the question, how to select a printer driver for a printer object without using the printer properties dialoges...

Regards, Rudi.

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Link to comment
Share on other sites

  • 4 weeks later...

Hi.

Happy new year to all of you.

May I ask again, pls:

Howto select the ghostpdf printer driver for an *ALREADY* installed printer?

Purpose:

FreePDF by default uses the Apple II Laserwriter. It's limited in it's max. paper size.

FreePDF uses GhostScript anyways. This one is coming with %programfiles%\gs8.54\lib\ghostpdf.inf. This printer driver can handle much larger paper sizes.

Now I'd like to add a functionality to my Autoit FreePDF & GS installer, so that it will select that ghostpdf printer driver as the active driver for the "printer" FreePDF.

Any sugestion appreciated, regards, Rudi.

Hi.

Just found A1:

$gsDir=@ProgramFilesDir & "\gs\gs8.54\lib"
$GhostPDF_INF=$gsDir & "\ghostpdf.inf"

$runstring= "rundll32 printui.dll,PrintUIEntry /c\\" & @ComputerName & " /ia /m ""Ghostscript PDF"" /f """ & $GhostPDF_INF & '"' 
$result=runwait($runstring,$gsDir)
ConsoleWrite($result & ", " & @error & ", " & @extended & @CRLF)

So there remains the question, how to select a printer driver for a printer object without using the printer properties dialoges...

Regards, Rudi.

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...