Franklin Heath Ltd

Master Your Information Assets

  • Categories

  • Meta

Custom Page Sizes for Microsoft Print to PDF

Posted by Craig H on 29 August 2015

I don’t usually post Windows tips and tricks, but I thought this might be useful as I haven’t seen it mentioned anywhere else. Briefly, the Windows 10 Print to PDF support doesn’t allow custom page sizes as it comes, but there is a simple way to enable it.

I’ve been setting up a new office PC with Windows 10 (while checking out the security and privacy settings, which have been well covered elsewhere). I use PDF a lot, for delivering clean versions of reports to clients and distributing presentation notes, so I was pleased to see Microsoft have built PDF creation in to Windows 10. It would be good if I didn’t need to install Acrobat any more, as it’s expensive, uses a lot of disk space, and is one more thing you have to keep up to date with security patches. However, one thing we currently use PDF for is preparing electronic payslips, for which we use a custom, small page size, and this wasn’t working with the Microsoft implementation.

It turns out that 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. Being an incurable tinkerer, I thought I’d try modifying it and see if it worked.

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 :

*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.

This seems to be producing correct output for me, so the puzzle is why Microsoft didn’t do this themselves. Perhaps they didn’t want to go through the extra testing for arbitrary page sizes, or maybe they did test it and saw problems with some specific page sizes, I don’t know. If this would be useful for you, please give it a go and let us know how it worked out for you in the comments!


28 Responses to “Custom Page Sizes for Microsoft Print to PDF”

  1. Craig H said

    Just to note: the recent Windows 10 Version 1511 cumulative update included a new GPD file for this driver with a different file name, but repeating the process described above gets the custom page sizes working again.

  2. David F said

    Thank you so much. I make my living as a music engraver, editor, printer. MSPDF would work for European publishing houses but here we need 9×12, 9.5×12.6666 (don’t ask), 10×13, and more. Of course, for 12×16 I needed to alter your MaxPrintSize and MaxPrintableWidth, but you showed the way. I’m with you; I see no reason for MS to have left this out of the code.

  3. Would you please consider adding some screenshots of this process? I have followed your instructions on Windows 10 Pro version 1511 and unfortunately have not been able to get the page size pull-down menu to display my custom form size of 11×17.

    • Craig H said

      I think 11×17 is just very slightly too big for the “MaxSize” parameters. Noting that I used A3 as the measure for my MaxSize, which is roughly 11.7 x 16.5 inches, you should probably increase the second number in the MaxSize pair to allow for the 17 inch height. Try:

      *Option: CUSTOMSIZE
      *MinSize: PAIR(936000, 1332000)
      *MaxSize: PAIR(5346000, 7780000)
      *MaxPrintableWidth: 5346000

      The units for MaxSize work out at 18000 per mm (457200 per inch) so you could experiment with even bigger sizes, do please let me know if that works for you!

  4. Alex said

    Thanks a lot Craig. Worked like a charm! I need to print in SRA3 size and that is not available by default. I was experiencing issues trying to install Acrobat 8 in a Windows 10 laptop just to get this size on a PDF printer, and now I don’t have to install it anymore. You helped me solve a big problem. I owe you a beer!

  5. Thank you Craig! I usually have success with CutePDF, but I had issues printing a long document in 8.5″x8.5″ format. Your tweaks did the trick. I did have two copies of 74e1846.gpd, and I had to edit both of them. When I just edited the first one, it showed the new page size but I could not select it. Well done mate!

  6. Mike Shawaluk said

    Just a quick note: there shouldn’t be a need to add 11″ x 17″ as a custom size, since that is already present as “Tabloid”.

    That said, thank you very much for publishing this information. I have been trying to create 7.5″ x 12″ PDFs, which will scale to fill the full display on a 16:10 tablet device.

  7. kbellis said

    Hello, Craig. Thank you for this narrative. Top marks for your tinker! It’s a pity Microsoft hasn’t satisfactorily addressed this issue.

    “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.”

    FYI & FWIW – ARCH D as a maximum

    *Option: CUSTOMSIZE
    *MinSize: PAIR(936000, 1332000)
    *MaxSize: PAIR(109728000, 164592000)
    *MaxPrintableWidth: 109728000

    On a related MS PDF niggle; when prompted to save the PDF file, the default name ideally should echo the name of the file being printed appended with the pdf suffix. Instead, the default is blank. When dealing with lengthy arcane file names, this becomes tiresome. Has this been addressed by another one of your in-depth examinations?

  8. Mike said

    Arch E1 maximum landscape & portrait orientation:

    *Option: CUSTOMSIZE
    *MinSize: PAIR(936000, 1332000)
    *MaxSize: PAIR(192024000, 192024000)
    *MaxPrintableWidth: 192024000

  9. Margaux said

    Screenshots please

    • Craig H said

      I’m sorry I don’t have time to do that at the moment; if you would care to follow the instructions and make screenshots of the process, I will be happy to add them here for the benefit of others. Thanks!

  10. Fantastic solution. Thanks. I had to reboot before the new page settings took effect. Otherwise, this worked flawlessly.

  11. Simon said

    I have had absolutely no luck at all. I went through as explained, but nothing turns up in the scroll down menu. I’ve tried rebooting and everything else, I started from scratch again with the back-up file, but still absolutely nothing happens.

    I used the explained code, inserted it after the line *DefaultOption: LETTER :
    I went to printer server settings made a new setting called e-book.
    But I never get the option to choose anything in the advanced settings in the scroll down menu when printing. Anybody has a clue to fix this.
    Got Windows 10, Home Edition. MS Word 2010.

  12. Osama said

    Thank so much it works great in latest Windows 10 Anniversary Update.

  13. mike Bellemans said

    Interesting article.
    I still have the problem that my PDF files are 5x bigger since the new PDF printerr of Windows.
    Before we used the Amyuni 450 driver that comes with our ERP software.
    Now on Windows X the ERP uses the standard windows PDF printer and explodes all my files.
    I did some testing and i figured ou this is because the Amyuni driver uses “FONT EMBEDDING” when making pdf files.

    Do you konw if it possible to enable this feature through the uses of registry hacks?

    Kind regards.

  14. john fisher said

    Hello, I’d love to try this but I don’t see “print server properties”, only “printer properties” so I can’t make a new form. Am I missing something? Thank You

    • Craig H said

      Hi John! I think you must be looking at the right-click menu, which is where you find “Printer properties”. Instead you should left-click “Microsoft Print to PDF” and then “Print server properties” appears as an option at the top of the control panel window, in between “See what’s printing” and “Remove device”.

      • Jo Smith said

        I’m also trying this, as I publish paperbacks and need PDFs to be the trade page sizes.
        Like John Fisher, I can’t see an option for “print server properties” on left-clicking “Microsoft Print to PDFs” – only the three options “Printer” “Document” and “View”.
        The file I changed was called ‘merged.gpd’ – was this perhaps the wrong file?

      • Craig H said

        I’m talking about the ribbon bar menu at the top of the “Devices and Printers” window, it appears after one left click, see this picture. You must have been double left clicking and looking at the “Microsoft Print to PDF” window.

        Devices and Printers

  15. Jo Smith said

    OK, got that now. Set up a new paper size, but even after restarting it doesn’t show as an option in Word. Maybe I edited the wrong driver at the start 😦

  16. Jo Smith said

    I’m grateful to you all for the idea, and glad it works for you. I’m always nervous about messing with parts of the system I don’t understand, and as I have a critical job to do right now I shan’t be tempting providence by changing anything until it’s done. I have a work-around anyway, by firing up my old computer with Windows XP (what’s not to like?) and using Word 2000 and Cute PDF Writer as I did before. But as Arnie says, I’ll be back!

  17. Inare said

    I tried doing this but I don’t really have any experience in this. I tried editing the GPD file by opening it in notepad. However there isn’t a “DefaultOption” line. There is however “Option: LETTER”. I’m very confused at this point of what I’m doing.

    • Craig H said

      All of the .gpd files on my Windows 10 system have the “*DefaultOption: LETTER” line, it’s after a line that says “*rcNameID: =PAPER_SIZE_DISPLAY”. Still, if you’re not confident doing this, I would recommend leaving well alone; if you edit the wrong .gpd file or put the new option in the wrong place, you could easily mess it up, sorry!

  18. Ameya said

    That was superbly done… Thanks a lot.. Needed a custom 8×10 page size! Got it..
    Is it possible to change the resolution the same way to give best print output on a remote computer where I send the PDF?

  19. Shah said


    This doesn’t seem to be working in build 1703. Anyone confirm if it works in version 1703?

  20. David M Hunt said

    As expected, Word now provides paper type “Custom” when using print to PDF. Adobe Reader does not. It’s options remain only the handful of restricted sizes. Have you encountered this?

  21. George Ercus said

    Thank you very much. It worked.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: