Use Case: I have a written MapBasic tool (v21) that allows the user to create a new layout from a map window and then it does all the window renaming and hiding, etc. The user can choose from 8.5x11, 11x17, 18x24, and 24x36 sizes. I want to automatically configure the correct paper size based on the layout contents.
Problem: The first two sizes are listed in the PaperSize.def file and are easy to configure. However, the last two are commonly known as ARCH C and ARCH D, respectively and these are not listed in the PaperSize.def. MapInfo leverages the printer forms in Windows and those two sizes are not listed there either.
Need: I need to find a way to dynamically configure these paper sizes. Or run a script to add these to both the Windows paper size list and have an enumeration for both that would work with the Set Window command.
Stuff I've Tried: Because I also need to print to the plotter, I have installed the HPGL drivers for the HP DesignJet series. Installing these drivers had the effect of adding these sizes to the options. However, each user may have a different set of printer sizes and corresponding enumerations based on the different printer drivers they have installed on their machines. Thus, I have no way of telling if printer size enumeration on my machine will match those on the user's machine.
Research: (i.e. stuff I've read, but don't know how to make work)
Add forms to the forms database - Windows drivers
Plotter Driver Capabilities - Windows drivers
Other Users Have Asked Before With No Solution:
MapInfo PDF Printer
MapBasic and PaperSize.Def - I agree with Peter here on the fundamental conflict with custom Windows forms. However, it is now 17 years later; is there still no solution? Can we not enumerate all of the existing printer forms and add a new one that doesn't conflict with any of the existing forms?
Unacceptable Answers:
- "Just make the user configure the size in Page Setup." - Friend, I have been tasked with automating this; the obvious answer will not work here.
- "Use the C Size Sheet, D Size Sheet, A1, or A2 that do appear in the list instead of ARCH C and ARCH D" - We choose these larger sizes to match the 2' and 3' rolls of plotter paper that are commonly sold here in the US. This eliminates having to trim excess paper we would have to do if we used the given sizes.
Thank you in advance for your consideration of this question.
------------------------------
John Hollingsworth
GIS Director
Clear Channel Outdoor
------------------------------