PHP Classes

Printing preferences

Recommend this page to a friend!

      PHP Google Cloud Print API  >  All threads  >  Printing preferences  >  (Un) Subscribe thread alerts  
Subject:Printing preferences
Summary:Printing preferences
Messages:3
Author:Dennis Freni
Date:2014-10-18 10:56:28
 

  1. Printing preferences   Reply   Report abuse  
Picture of Dennis Freni Dennis Freni - 2014-10-18 10:56:28
Hi,

I'm trying to figure out how to send the printing preferences like page orientation to the printer...

any idea?

Greets Dennis

  2. Re: Printing preferences   Reply   Report abuse  
Picture of Dennis Freni Dennis Freni - 2014-10-18 11:36:06 - In reply to message 1 from Dennis Freni
I allready found it...

I added a variable $printSettings and used it in the postfields

NEW CODE:

// Printing Settings
$printSettings = '{"version": "1.0","print": {"page_orientation": { "type": 1 }}}';

// Prepare post fields for sending print
$post_fields = array(
'printerid' => $printerid,
'title' => $printjobtitle,
'ticket' => $printSettings,
'contentTransferEncoding' => 'base64',
'content' => base64_encode($contents), // encode file content as base64
'contentType' => $contenttype
);

  3. Re: Printing preferences   Reply   Report abuse  
Picture of Yasir Siddiqui Yasir Siddiqui - 2014-10-20 04:36:17 - In reply to message 2 from Dennis Freni
Hi Dennis,
Thanks for sharing your findings here.