Have a question about CiviCRM? Get it answered quickly at the new CiviCRM Stack Exchange Q+A siteThis forum was archived on 25 November 2017. Learn more.How to get involved.What to do if you think you've found a bug.
The allowable values for page size and orientation are defined by the dompdf package, but I can certainly add them to the option_group and option_value tables and then pull from there when populating the selection lists. The only thing I'll need help with is info about how to add the new table entries to database during the install/upgrade process. When looking at the SVN repository, it wasn't clear to me which files are involved, and I couldn't find any info about the process for adding new database entries in the forums.
I do think that allowing the page settings to be saved along with the PDF template is an important capability. For example, if an admin creates a template to print envelopes, we don't want the user to have to remember and reconfigure the page settings each time they go to print the envelopes. Simply loading the template would load the corresponding page settings as well.To accomplish this, I think I need to create a new db table with rows containg the page settings and indexed by template ID. The page settings would be saved when the template is saved on the PDF letter creation page. When the template is deleted then the corresponding page settings row would be deleted as well, although I'm not knowledgable about foreign keys and whether or not that happens autommatically.
Why should the margin values be read only?
Why should the margin values be read only? It would improve the usability if the end-user could experiment with the margin settings without leaving the screen. Perhaps a small link that opens a dialog/area for people that want to change the margins, then they can continue their letter.