×

Suppress PDF upon creation of a document 

Last updated: July 19, 2022

MA!N can create Word documents and e-mail, but you might want a PDF copy as well. This is possible. You can set this option in the settings table and make it the default for all documents that you create. It is also possible to change this setting with an AdjustSettings command, then it will be for one document only.

The below two settings are not default in the settings table. You need to insert them for using this feature. By inserting them you create a .PDF instead of a .DOCX (setting 1) and there is no BATCH file generated (setting 2).

-- Use settings for default environment settings, use Adjust Settings for letter specific options (no entry in Settings table needed).
-- Note: Actions Open links to the output file which might be DOTX or PDF based on the settings

select * from [settings]  where [Configuration ID] like  'Template settings'

-- Export letter to PDF
insert into [settings] ([Configuration ID], [Option 1], [Option 2])
values ('Template settings', 'Save as type', 'PDF')                               -- Default for all letters, otherwise use in Adjusted Settings per letter. All other options -> DOCX.

-- Only create the letter, no batch files
insert into [settings] ([Configuration ID], [Option 1], [Option 2])
values ('Template settings', 'Preview', 'False')                                  -- Default for all letters, otherwise use in Adjusted Settings per letter