Windows printer drivers need to explicitly specify that they will support custom page sizes, and for some reason Microsoft Print to PDF doesn’t do that.
First you need to find the GPD file for the driver, which is installed under
C:\Windows\System32\spool\V4Dirs
. I was able to find the folder and file names by using regedit and looking in the registry key HKEY_LOCAL_MACHINE\SOFTWARE\ Microsoft\Windows NT\CurrentVersion\Print\Printers\ Microsoft Print to PDF\PrinterDriverData
. On my system it is {084F01FA‑E634‑4D77‑83EE‑074817C03581}\74e1846.gpd
; you will probably find you have the same file name but a different folder name.
Now, make a backup copy of the GPD file, so you can restore it if you fumble the editing. Then you need to edit the original file and add the following section, immediately after the line
*DefaultOption: LETTER
:*Option: CUSTOMSIZE
{
*rcNameID: =USER_DEFINED_SIZE_DISPLAY
*MinSize: PAIR(936000, 1332000)
*MaxSize: PAIR(5346000, 7560000)
*MaxPrintableWidth: 5346000
}
The values for
MaxSize
are copied from the largest page size already defined (A3) and the values for MinSize
are scaled down proportionately from that to represent A8 size. Save the new file somewhere, then copy it over the top of the original file.
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.