\hypertarget{interfaceMike42_1_1Escpos_1_1PrintBuffers_1_1PrintBuffer}{}\section{Mike42\textbackslash{}Escpos\textbackslash{}Print\+Buffers\textbackslash{}Print\+Buffer Interface Reference}
\label{interfaceMike42_1_1Escpos_1_1PrintBuffers_1_1PrintBuffer}\index{Mike42\textbackslash{}\+Escpos\textbackslash{}\+Print\+Buffers\textbackslash{}\+Print\+Buffer@{Mike42\textbackslash{}\+Escpos\textbackslash{}\+Print\+Buffers\textbackslash{}\+Print\+Buffer}}


Inheritance diagram for Mike42\textbackslash{}Escpos\textbackslash{}Print\+Buffers\textbackslash{}Print\+Buffer\+:
% FIG 0
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{interfaceMike42_1_1Escpos_1_1PrintBuffers_1_1PrintBuffer_a27a593f10bb3ebf23035bc715185f903}{flush} ()
\item 
\hyperlink{interfaceMike42_1_1Escpos_1_1PrintBuffers_1_1PrintBuffer_a534dceed0453bffe04d5226281792389}{get\+Printer} ()
\item 
\hyperlink{interfaceMike42_1_1Escpos_1_1PrintBuffers_1_1PrintBuffer_a40fec41715c8f6a5db1e8d2e641834b4}{set\+Printer} (\hyperlink{classMike42_1_1Escpos_1_1Printer}{Printer} \$printer=null)
\item 
\hyperlink{interfaceMike42_1_1Escpos_1_1PrintBuffers_1_1PrintBuffer_aeeab8ff585f1862f8b75fd2980656709}{write\+Text} (\$text)
\item 
\hyperlink{interfaceMike42_1_1Escpos_1_1PrintBuffers_1_1PrintBuffer_a7983b2aadd432e61cefa104747e12917}{write\+Text\+Raw} (\$text)
\end{DoxyCompactItemize}


\subsection{Detailed Description}
Print buffers manage newlines and character encoding for the target printer. They are used as a swappable component\+: text or image-\/based output.


\begin{DoxyItemize}
\item Text output (\hyperlink{classMike42_1_1Escpos_1_1PrintBuffers_1_1EscposPrintBuffer}{Escpos\+Print\+Buffer}) is the fast default, and is recommended for most people, as the text output can be more directly manipulated by E\+S\+C/\+P\+O\+S commands.
\item Image output (\hyperlink{classMike42_1_1Escpos_1_1PrintBuffers_1_1ImagePrintBuffer}{Image\+Print\+Buffer}) is designed to accept more encodings than the physical printer supports, by rendering the text to small images on-\/the-\/fly. This takes a lot more C\+P\+U than sending text, but is necessary for some users.
\item If your use case fits outside these, then a further speed/flexibility trade-\/off can be made by printing directly from generated H\+T\+M\+L or P\+D\+F. 
\end{DoxyItemize}

\subsection{Member Function Documentation}
\hypertarget{interfaceMike42_1_1Escpos_1_1PrintBuffers_1_1PrintBuffer_a27a593f10bb3ebf23035bc715185f903}{}\index{Mike42\+::\+Escpos\+::\+Print\+Buffers\+::\+Print\+Buffer@{Mike42\+::\+Escpos\+::\+Print\+Buffers\+::\+Print\+Buffer}!flush@{flush}}
\index{flush@{flush}!Mike42\+::\+Escpos\+::\+Print\+Buffers\+::\+Print\+Buffer@{Mike42\+::\+Escpos\+::\+Print\+Buffers\+::\+Print\+Buffer}}
\subsubsection[{flush}]{\setlength{\rightskip}{0pt plus 5cm}Mike42\textbackslash{}\+Escpos\textbackslash{}\+Print\+Buffers\textbackslash{}\+Print\+Buffer\+::flush (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}\label{interfaceMike42_1_1Escpos_1_1PrintBuffers_1_1PrintBuffer_a27a593f10bb3ebf23035bc715185f903}
Cause the buffer to send any partial input and wait on a newline. If the printer is already on a new line, this does nothing. 

Implemented in \hyperlink{classMike42_1_1Escpos_1_1PrintBuffers_1_1EscposPrintBuffer_a39aad0835900e10aa7e7699d86ff07a4}{Mike42\textbackslash{}\+Escpos\textbackslash{}\+Print\+Buffers\textbackslash{}\+Escpos\+Print\+Buffer}, and \hyperlink{classMike42_1_1Escpos_1_1PrintBuffers_1_1ImagePrintBuffer_a2ec572d73c3de5d23a60f85e97053a6f}{Mike42\textbackslash{}\+Escpos\textbackslash{}\+Print\+Buffers\textbackslash{}\+Image\+Print\+Buffer}.

\hypertarget{interfaceMike42_1_1Escpos_1_1PrintBuffers_1_1PrintBuffer_a534dceed0453bffe04d5226281792389}{}\index{Mike42\+::\+Escpos\+::\+Print\+Buffers\+::\+Print\+Buffer@{Mike42\+::\+Escpos\+::\+Print\+Buffers\+::\+Print\+Buffer}!get\+Printer@{get\+Printer}}
\index{get\+Printer@{get\+Printer}!Mike42\+::\+Escpos\+::\+Print\+Buffers\+::\+Print\+Buffer@{Mike42\+::\+Escpos\+::\+Print\+Buffers\+::\+Print\+Buffer}}
\subsubsection[{get\+Printer}]{\setlength{\rightskip}{0pt plus 5cm}Mike42\textbackslash{}\+Escpos\textbackslash{}\+Print\+Buffers\textbackslash{}\+Print\+Buffer\+::get\+Printer (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}\label{interfaceMike42_1_1Escpos_1_1PrintBuffers_1_1PrintBuffer_a534dceed0453bffe04d5226281792389}
Used by \hyperlink{namespaceMike42_1_1Escpos}{Escpos} to check if a printer is set. 

Implemented in \hyperlink{classMike42_1_1Escpos_1_1PrintBuffers_1_1EscposPrintBuffer_a93c5beb2d70ffe1ae22628991e29393f}{Mike42\textbackslash{}\+Escpos\textbackslash{}\+Print\+Buffers\textbackslash{}\+Escpos\+Print\+Buffer}, and \hyperlink{classMike42_1_1Escpos_1_1PrintBuffers_1_1ImagePrintBuffer_aed5afb0fddc200b38dc98c6185441899}{Mike42\textbackslash{}\+Escpos\textbackslash{}\+Print\+Buffers\textbackslash{}\+Image\+Print\+Buffer}.

\hypertarget{interfaceMike42_1_1Escpos_1_1PrintBuffers_1_1PrintBuffer_a40fec41715c8f6a5db1e8d2e641834b4}{}\index{Mike42\+::\+Escpos\+::\+Print\+Buffers\+::\+Print\+Buffer@{Mike42\+::\+Escpos\+::\+Print\+Buffers\+::\+Print\+Buffer}!set\+Printer@{set\+Printer}}
\index{set\+Printer@{set\+Printer}!Mike42\+::\+Escpos\+::\+Print\+Buffers\+::\+Print\+Buffer@{Mike42\+::\+Escpos\+::\+Print\+Buffers\+::\+Print\+Buffer}}
\subsubsection[{set\+Printer}]{\setlength{\rightskip}{0pt plus 5cm}Mike42\textbackslash{}\+Escpos\textbackslash{}\+Print\+Buffers\textbackslash{}\+Print\+Buffer\+::set\+Printer (
\begin{DoxyParamCaption}
\item[{{\bf Printer}}]{\$printer = {\ttfamily null}}
\end{DoxyParamCaption}
)}\label{interfaceMike42_1_1Escpos_1_1PrintBuffers_1_1PrintBuffer_a40fec41715c8f6a5db1e8d2e641834b4}
Used by \hyperlink{namespaceMike42_1_1Escpos}{Escpos} to hook up one-\/to-\/one link between buffers and printers.


\begin{DoxyParams}[1]{Parameters}
\hyperlink{classMike42_1_1Escpos_1_1Printer}{Printer} | null & {\em \$printer} & New printer \\
\hline
\end{DoxyParams}


Implemented in \hyperlink{classMike42_1_1Escpos_1_1PrintBuffers_1_1EscposPrintBuffer_aecb9ca7d1fa8f43431524db16b3ff60e}{Mike42\textbackslash{}\+Escpos\textbackslash{}\+Print\+Buffers\textbackslash{}\+Escpos\+Print\+Buffer}, and \hyperlink{classMike42_1_1Escpos_1_1PrintBuffers_1_1ImagePrintBuffer_a69b5f042d9ee85cab0c2aae2f43582b4}{Mike42\textbackslash{}\+Escpos\textbackslash{}\+Print\+Buffers\textbackslash{}\+Image\+Print\+Buffer}.

\hypertarget{interfaceMike42_1_1Escpos_1_1PrintBuffers_1_1PrintBuffer_aeeab8ff585f1862f8b75fd2980656709}{}\index{Mike42\+::\+Escpos\+::\+Print\+Buffers\+::\+Print\+Buffer@{Mike42\+::\+Escpos\+::\+Print\+Buffers\+::\+Print\+Buffer}!write\+Text@{write\+Text}}
\index{write\+Text@{write\+Text}!Mike42\+::\+Escpos\+::\+Print\+Buffers\+::\+Print\+Buffer@{Mike42\+::\+Escpos\+::\+Print\+Buffers\+::\+Print\+Buffer}}
\subsubsection[{write\+Text}]{\setlength{\rightskip}{0pt plus 5cm}Mike42\textbackslash{}\+Escpos\textbackslash{}\+Print\+Buffers\textbackslash{}\+Print\+Buffer\+::write\+Text (
\begin{DoxyParamCaption}
\item[{}]{\$text}
\end{DoxyParamCaption}
)}\label{interfaceMike42_1_1Escpos_1_1PrintBuffers_1_1PrintBuffer_aeeab8ff585f1862f8b75fd2980656709}
Accept U\+T\+F-\/8 text for printing.


\begin{DoxyParams}[1]{Parameters}
string & {\em \$text} & Text to print \\
\hline
\end{DoxyParams}


Implemented in \hyperlink{classMike42_1_1Escpos_1_1PrintBuffers_1_1EscposPrintBuffer_a85457ce8bd33f580fbb0fc2ab54e80d0}{Mike42\textbackslash{}\+Escpos\textbackslash{}\+Print\+Buffers\textbackslash{}\+Escpos\+Print\+Buffer}, and \hyperlink{classMike42_1_1Escpos_1_1PrintBuffers_1_1ImagePrintBuffer_ad1841208af0b228c423ad1e2c5f916eb}{Mike42\textbackslash{}\+Escpos\textbackslash{}\+Print\+Buffers\textbackslash{}\+Image\+Print\+Buffer}.

\hypertarget{interfaceMike42_1_1Escpos_1_1PrintBuffers_1_1PrintBuffer_a7983b2aadd432e61cefa104747e12917}{}\index{Mike42\+::\+Escpos\+::\+Print\+Buffers\+::\+Print\+Buffer@{Mike42\+::\+Escpos\+::\+Print\+Buffers\+::\+Print\+Buffer}!write\+Text\+Raw@{write\+Text\+Raw}}
\index{write\+Text\+Raw@{write\+Text\+Raw}!Mike42\+::\+Escpos\+::\+Print\+Buffers\+::\+Print\+Buffer@{Mike42\+::\+Escpos\+::\+Print\+Buffers\+::\+Print\+Buffer}}
\subsubsection[{write\+Text\+Raw}]{\setlength{\rightskip}{0pt plus 5cm}Mike42\textbackslash{}\+Escpos\textbackslash{}\+Print\+Buffers\textbackslash{}\+Print\+Buffer\+::write\+Text\+Raw (
\begin{DoxyParamCaption}
\item[{}]{\$text}
\end{DoxyParamCaption}
)}\label{interfaceMike42_1_1Escpos_1_1PrintBuffers_1_1PrintBuffer_a7983b2aadd432e61cefa104747e12917}
Accept 8-\/bit text in the current encoding and add it to the buffer.


\begin{DoxyParams}[1]{Parameters}
string & {\em \$text} & Text to print, already the target encoding. \\
\hline
\end{DoxyParams}


Implemented in \hyperlink{classMike42_1_1Escpos_1_1PrintBuffers_1_1EscposPrintBuffer_a59ec5241f98fc6cd51cfee19342ad78e}{Mike42\textbackslash{}\+Escpos\textbackslash{}\+Print\+Buffers\textbackslash{}\+Escpos\+Print\+Buffer}, and \hyperlink{classMike42_1_1Escpos_1_1PrintBuffers_1_1ImagePrintBuffer_a088e01ed8a8532ff6f95ed6a8d9a481c}{Mike42\textbackslash{}\+Escpos\textbackslash{}\+Print\+Buffers\textbackslash{}\+Image\+Print\+Buffer}.



The documentation for this interface was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
C\+:/www/aplusnet/incahellas.\+com/public\+\_\+html/lib/escpos-\/php-\/development/src/\+Mike42/\+Escpos/\+Print\+Buffers/Print\+Buffer.\+php\end{DoxyCompactItemize}
