![]() |
pdfMachine Technical F.A.Q.
|
| LANG | Can currently be EN(English), DE(German), FR(French), ES(Spanish), PL(Polish), PT(Portuguese), IT(Italian) |
| startMenuName | Controls the name on the start menu |
| printer | Name of the printer (defaults to BroadGun pdfMachine) |
| quiet | Set to 1 to install without user interaction |
| isShared | Set to 1 to share the printer on the network. |
| OfficeAddin | Set to 1 to install the Microsoft Office addin toolbar |
| installerStartBgProcess | Set to 0 to prevent bgsmsnd.exe being started during install. See more info here |
NOTE: This setup is only necessary if you don't want the default behaviour where
the server side sends email / saves / views.
This uses a partially implemented feature of pdfMachine that requires some manual
setup.
Server machine setup:
Setup pdfMachine to print to a pdf file and update a text file in directory(s) on
the server.
1. Install pdfMachine
2. On the "Next Action tab", set the "Next Action" to "execute command line"
and the "Command Line" to:
cscript.exe c:\touchx.js "%s"
NOTE : See the following FAQ about
batch files in "Next Action".
3. Create a script file (e.g. C:\touchx.js) which updates a file
(e.g. c:\tmp\x.txt)
in a server directory that clients can access. e.g.
fn = WScript.arguments(0);
fso = new ActiveXObject("Scripting.FileSystemObject");
fso.CopyFile(fn, "c:\tmp\x.pdf", true);
f = fso.CreateTextFile("c:\tmp\x.txt", true);
f.Close()
4.
Now when a print is done on the server machine, no user interface is presented,
the pdf file c:\tmp\x.pdf is generated, and then the file c:\tmp\x.txt is updated.
Client side setup:
Setup pdfMachine to check the server file periodically. The client side must have
a drive mapped which allows access to the directory that the server puts the files
into (e.g. x.pdf and x.txt above).
1. Install pdfMachine
2. On the general tab, set "Save Filename action" to "Use the default
dir and default save filename" and set the "default directory" and
"default filename" to the client side mapping of the path required to
access the pdf file (e.g. x.pdf above) on the server.
3. Create a new registry string value called "checkfile" under the key
"HKEY_CURRENT_USER\Software\pdfMachine\Broadgun pdfMachine". The last
part of the path is the printer name which in this example is the default printer
name Broadgun pdfMachine. Set the string registry value to the client side filepath
mapping required to access the file on the server. (e.g. \\server\c\x.txt)
4. Either reboot the client PC or stop and restart bgsmsnd.exe (bgsmsnd.exe is usually in c:\windows\system32\spool\drivers\32x86\3)
Now when the server file c:\tmp\x.txt is updated, the client bgsmsnd.exe notices
(the checkfile registry val does this) and will load the pdf file on the client.
NOTE: You can choose to have the file automatically emailed by the client by setting
the client option "Next Action" to "Launch default email client".
If you want encryption with this option, enable it on the server, not the client.
The message can sometimes occur when printing from Internet Explorer in protected mode.
Make sure the pdfMachine toolbar is installed and enabled in Internet Explorer.
Make sure you use the pdfMachine toolbar icon in Internet Explorer to initiate the print to PDF. That way you should not get the error message.
The pdfMachine toolbar does several things, one is to workaround the problem you are getting. The other main thing it does is convert HTML hyerlinks into PDF hyperlinks.
Exit all applications you are not using.
1. Run bgssetup.exe -uninstall
e.g. from
the start menu button, select run, then type:
On 32 bit systems:
C:\WINDOWS\system32\spool\drivers\w32x86\3\bgssetup.exe -uninstall
On 64 bit systems:
C:\WINDOWS\system32\spool\drivers\x64\3\bgssetup.exe -uninstall
2. You may need to change the above path to match your system. If this works, you
have successfully uninstalled.
Otherwise try; (be careful, don't go editing the registry unless you know what you
are doing...)
1. Start a command line session e.g cmd.exe
2. Type "net stop spooler"
3. Type "regedit"
4. From within regedit - delete the following registry keys (and all subkeys):
HKEY_CURRENT_USER\Software\pdfMachine
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Monitors\PDF Port
Monitor
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Printers\BroadGun pdfMachine
5. From the command line, type "net start spooler"
6. Re-attempt the install.
First read the above section, Can I customize the pdfMachine install
Here is how to repackage the pdfMachine.exe self extracting zip with new options:
- Open pdfMachine.exe in a zip program. eg Winzip,
or 7zip.
- Extract the contents to directory of your choosing.
- Edit the bgsconf.ini
- Create a zip file of the new contents.
eg in the directory contains the extracted and edited files
zip ..\pdfmachine.zip *.*
- Create a new pdfMachine.exe using winzipse
eg in the directory containing the zip file:
winzipse has a limited command line capability so requires these parameters be put
in a text file
create winzipse.txt containing pdfmachine.zip -st pdfMachine.exe -setup -i pdfMachn.ico
-t setupdlg.txt -win32 -le -C .\bgssetup.exe
then run winzipse @winzipse.txt
You now have a new pdfMachine.exe
To install printers, the installer needs administrative privileges. This can be
done using the runas command.
runas /user:Admin pdfMachine.exe
Then enter the Admin users password.
(runas does not allow the password to be specified as a command line parameter -
see below for further information)
Unfortunately, the standard pdfMachine.exe generates an error because it starts
a background process running as the Admin user.
To prevent this, you need to set installerStartBgProcess=0 in the bgsconf.ini file.
bgsmsnd.exe must be running (as the user) for the user to successfully print to
pdfMachine.
When the runas command completes, you should then run the bgsmsnd.exe as the normal
user.
(alternatively bgsmsnd.exe will be started automatically next time the user logs
on)
To use runas without having to manually enter the admin password, requires that you create a script to enter the password for you.
There are a few common ways to do this, some more secure than others:
scriptit - Microsoft's utility for building install scripts.
autoit - A free scripting utility - can produce
compiled scripts as standalone executables.
Runas Professional - Can
take password on command line but can also produce standalone exes with the password
encrypted internally.
Some users have reported an obscure "error 126" when installing pdfMachine.
We have had a report that this can occur as a result of some other program incorrectly
setting a registry type. The fix was:
1. Open regedit.exe
2. Navigate to :
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
3. Rename "Path" value to "Path.1" or some other temporary value.
(Right click on value, select rename)
4. Create a new value called "Path" of type "Expandable String Value".
To do this, right click in regedit window, select "New-> Expandable String
Value"
5. Copy the value of "Path.1" to "Path".
6. Make sure the Path value includes the directory:
%SystemRoot%\System32\Wbem
(see
http://support.microsoft.com/default.aspx?scid=kb;EN-US;319114 for details
)
6. You may have to reboot for the new setting to take effect. Once rebooted, run the installer again.
It may then be necessary to reboot the server or to force an immediate policy refresh for the change to take effect.
Alternatively, you can run other executables, including cscript.exe as shown in this cscript
"Next Action" example.