PDF Output Set whether to show pdf in browser or download or save or return as string

You can easily set pdf output type by setting "output" type. There are 4 different options available.
set output type - Default is 'I' = "send the file inline to the browser" output set.
Other options: Set 'D' = "send to the browser and force a file download with the name given by $filename."
Set 'F' = "save to a local file with the name given by $filename (may include a path)."
Set 'S' = "return the document "as a string. $filename is ignored."

  
                            $xinvoice = new Xinvoice();
                            //set filename, default is set "invoice.pdf" in defualtSettings.php 
                            $xinvoice->setSettings("filename", "invoice_001.pdf");
                            //set output type - Default is 'I' = "send the file inline to the browser" output set. 
                            //Other options: Set 'D' = "send to the browser and force a file download with the name given by $filename."
                            //Set 'F' = "save to a local file with the name given by $filename (may include a path)."
                            //Set 'S' = "return the document "as a string. $filename is ignored."
                            $xinvoice->setSettings("output", "D");
                            echo $xinvoice->render();