How to generate PDF archive files of an invoice

To generate PDF archive files of an invoice in the generalInvoiceRequestManager use
(PDF=PDF_file_to_generate;)
or
(PDF_NOPRINT=PDF_file_to_generate;)
as an object name in the Print method. The "PDF" token means to print the invoice and generate the PDF files, whereas the "PDF_NOPRINT" token only generates the PDF files without physical printing.
This object definition is only used while printing and is ignored in the preview mode!

In its simplest form e.g. in the generalInvoiceRequestManager code this means


     BSTR bstrPrintTemplate = "(PDF="+bstrPDFFile+";)";
	 
     IGeneralInvoiceRequestManager::Print(bstrPrintTemplate,...);                            
    
in order to generate a PDF archive file of the "TP Rechnung" or the "Patienten-Rechnung" AND "Rückforderungsbeleg" in the TG case.
If two separated PDF archive files should be generated in the TG case ("Patienten-Rechnung" and "Rückerstattungsbeleg") then produce a comma separated list of PDF file names e.g.

     BSTR bstrPrintTemplate = "(PDF="+bstrPDFFile1+","+bstrPDFFile2+";)";
	 
     IGeneralInvoiceRequestManager::Print(bstrPrintTemplate,...);                            
    

Since the PDF generation is not the main purpose of the Print method this PDF feature has NO error propagation. The generation is done on a best effort basis, errors are only dumped to the log file!
Boundary conditions:
  • Only active in printing mode
  • No error propagation
  • The supplied PDF archive name(s) must not exist
  • The directory where the PDF is stored must be writable (EMF files are temporarily generated and delete there.)