Sei sulla pagina 1di 12

The Mysteries of Microsoft Print to PDF

In Windows 10, Microsoft has included a pdf printer, but it is rather limited. These
limitations can be overcome as follows, but at the time of writing, I have not yet found a way
to export the newly created settings from one computer to another. This means that the
printer has to be set up again on any computer on which it is desired to print to any size other
than the defaults.
The print command in any software will list Microsoft Print to PDF amongst the real and
virtual printers installed:

… with the Preferences button offering choices of paper size and orientation.
In a default installation of Windows 10, the largest size available is A3:
… whereas the well-established Microsoft proprietary XPS printer has a multitude of choices:

Customising the pdf printer is discussed here, rather elliptically:


https://franklinheath.co.uk/2015/08/29/custom-page-sizes-for-microsoft-print-to-pdf/
… and the article requires fleshing out for a full treatment.
If we press WINKEY + R and type regedit:

… the key to identify the relevant file to be customised is, as stated in the link above,
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\
Printers\Microsoft Print to PDF\PrinterDriverData. This takes us to here:
If we right click the V4_Merged_ConfigFile_Name key and choose to Modify, we get this:

… from which we can copy the file name, 69b8a4a.gpd, and then search for it in the
C:\Windows directory:

… and find it in the C:\Windows\System32\spool\V4Dirs\F1810069-0F74-4E1B-AD3A-


A7C3E9FC4B45 folder. The folder name, in red, changes from computer to computer.
The article merely suggests copying the file off to edit it, and continues, ‘Save the new file
somewhere, then copy it over the top of the original file.’ Whilst copying out is
straightforward, copying back cannot be done directly, as the folder is protected. Editing the
security settings, is described below.
If we copy off 69b8a4a.gpd to somewhere suitable, we can paste the code snippet, namely:
*Option: CUSTOMSIZE
{
*rcNameID: =USER_DEFINED_SIZE_DISPLAY
*MinSize: PAIR(936000, 1332000)
*MaxSize: PAIR(5346000, 7560000)
*MaxPrintableWidth: 5346000
}
… immediately after the line, ‘*DefaultOption: LETTER’, thus:

However, the author of the article in the link above, has accepted the default upper limit of
A3 and merely extended the smaller sizes down to A8. To enlarge the upper limits, we need
to research the capabilities of the equipment available, in Central’s case a 42” HP DesignJet
500ps Plus, as described at http://h20195.www2.hp.com/v2/GetPDF.aspx/5983-1095EEE.pdf
The maximum print size stated there, if the correct paper is available, is 1067mm x
15240mm:

Multiplying these sizes by 18000 to give us the correct format, gives us the following three
lines:
*MinSize: PAIR(936000, 1332000)
*MaxSize: PAIR(19206000, 274320000)
*MaxPrintableWidth: 19206000
The adjustments are shown in red. The MaxPrintableWidth has to be the same as the first
entry in MaxSize, which is the width of the paper, assuming full edge to edge printing.
Margins can be specified later.
Whilst of course these alterations can be saved, and copied from computer to computer, the
file cannot be further edited to allow for different page sizes, with the one exception as
follows.
The author of the article proceeds, quite correctly, thus:
Now you can define a custom page size in the normal way: go to Devices and Printers in the
control panel, select the printer Microsoft Print to PDF, click Print Server properties on
the ribbon menu, tick Create a new form, give it a name and enter the dimensions you want,
then click Save Form. Now when you print something, select Microsoft Print to PDF as the
printer, click Preferences, then Advanced and you should see your new page size in the
pulldown menu.
A default installation of Microsoft Print to PDF includes an A2 form:

… which is not listed in the default preferences:


If all that is desired is to add A2 functionality for a poster printer, navigate to *Option: A3,
copy the A3 string to immediately above itself:

Then edit it as follows:


*Option: A2
{
*rcNameID: =RCID_DMPAPER_SYSTEM_NAME
*PrintSchemaKeywordMap: "ISOA2"
*PrintableOrigin: PAIR(0, 0)
*PrintableArea: PAIR(7560000, 10692000)
}

There is no need to import the CUSTOMSIZE code snippet, unless you want to go smaller
than A5. Again, this file can be copied from computer to computer in an A2 environment.
However, to make use of a large plotter, and to get a tidy output in printer preferences, we
have to delete the ‘A’ paper sizes from the 69b8a4a.gpd file:
Then we have to enter into the print server all the new forms desired in the order in which we
wish them to appear in the Windows 10 apps, such as Photos:

So, to get the menu to read from ‘Oversize ISO A0’ to ‘ISO A8’, we have to create forms in
that order, starting thus:

… and (noting that margins can be set bottom right of the above screen) finishing thus:
The ‘Plot Min 210SQ’ option is merely to denote the minimum plot size that Central’s plotter
can handle, namely 210mm x 210mm. As can be seen, the Windows 10 apps have a nice
graphical preview of what will be produced:
Note that adding new entries that do not correspond to existing forms available to Microsoft
Print to PDF on the print server will simply crash the program, which is why the new forms
have to be created in this tedious way, and do not seem to be portable.
When the basic edit of the 69b8a4a.gpd file is done (namely importing the A2 form or the
CUSTOMSIZE code), it has to be copied back to the relevant folder:

The original file is protected, so, right click and open Properties:

… and then the Security tab, and click on Advanced:


… to get this:

Click on Change, as highlighted, to yield:

… then on Advanced:

.. then Find Now as highlighted, above, to get a list of names:


Choose as desired to return to:

… and OK out to confirm the change is in place at 1, Apply it at 2 and OK out at 3:

On Applying answer OK to this notice and follow the instructions:


Open the Properties dialogue and the Security tab again and highlight the Users entry, which
has been enabled by the choices above, and click Edit:

Allow the Users Full control, as shown, and Apply to get the following warning:

… and click on Yes, and OK all the way out. Now you can edit the file in situ or overwrite it.
Microsoft Print to PDF has its critics, http://www.techrepublic.com/article/take-advantage-of-
the-microsoft-print-to-pdf-feature/ , and it may just be easier to install Cute PDF or similar,
but at least it is another useful function enabled without recourse to yet more third party
software.

Simon Canelle
Wimbledon 5th September 2016

Potrebbero piacerti anche