Added examples, tweaked print job
This commit is contained in:
		
							
								
								
									
										17
									
								
								examples/print.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								examples/print.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,17 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
require_once __DIR__."/../vendor/autoload.php";
 | 
			
		||||
 | 
			
		||||
use NoccyLabs\Lpr\PrintJob;
 | 
			
		||||
 | 
			
		||||
$job = new PrintJob("image.png");
 | 
			
		||||
 | 
			
		||||
// Configure
 | 
			
		||||
$job->setPrinter("QL-570");
 | 
			
		||||
$job->setMedia("A4");
 | 
			
		||||
 | 
			
		||||
// Additional options can be set like this
 | 
			
		||||
$job->setOption("fit-to-page", true);
 | 
			
		||||
 | 
			
		||||
// Invoke lpr to print the image
 | 
			
		||||
$job->submit();
 | 
			
		||||
		Reference in New Issue
	
	Block a user