PageSourceSearch

https://parzibyte.me/http-esc-pos-desktop-docs/assets/upside-down-print.html-C6xULMZj.js

js parzibyte.me collected 2026-10-03 23:16:21 UTC 13,750 bytes, 46 lines download raw bytes

1import{_ as r,r as t,c,d as s,b as a,w as p,a as o,o as u,e as l}from"./app-P091f_m-.js";const d={};function m(k,n){const e=t("RouteLink"),i=t("Playground");return u(),c("div",null,[n[2]||(n[2]=s("h1",{id:"upside-down-print",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#upside-down-print"},[s("span",null,"Upside down print")])],-1)),n[3]||(n[3]=s("p",null,[s("code",null,"EstablecerImpresionAlReves")],-1)),n[4]||(n[4]=s("p",null,"Enable or disable upside down print",-1)),s("p",null,[a(e,{to:"/playground.html?operacion=EstablecerImpresionAlReves"},{default:p(()=>n[0]||(n[0]=[l("Try it on the Playground")])),_:1})]),n[5]||(n[5]=o(`<h2 id="arguments" tabindex="-1"><a class="header-anchor" href="#arguments"><span>Arguments</span></a></h2><h3 id="enable-or-disable-upside-down-text-print-argumentos-0" tabindex="-1"><a class="header-anchor" href="#enable-or-disable-upside-down-text-print-argumentos-0"><span>Enable or disable upside down text print (<code>argumentos[0]</code>)</span></a></h3><p><strong>Description:</strong> Enable or disable upside down text print</p><p><strong>Index:</strong> <code>0</code></p><p><strong>Type:</strong> <code>bool</code></p><p><strong>Example:</strong> <code>true</code></p><h2 id="operation-example" tabindex="-1"><a class="header-anchor" href="#operation-example"><span>Operation example</span></a></h2><p>Push this operation to the operation list (whose key is <code>operaciones</code>) that you will send with the request.</p><p>Its name is <code>EstablecerImpresionAlReves</code>, so it goes on the <code>nombre</code> key. Then put the arguments in order inside the <code>argumentos</code> array.</p><p>Don&#39;t forget to check every argument type</p><div class="language-json line-numbers-mode" data-highlighter="prismjs" data-ext="json" data-title="json"><pre><code><span class="line"><span class="token punctuation">{</span></span>
2<span class="line">        <span class="token property">&quot;nombre&quot;</span><span class="token operator">:</span> <span class="token string">&quot;EstablecerImpresionAlReves&quot;</span><span class="token punctuation">,</span></span>
3<span class="line">        <span class="token property">&quot;argumentos&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span></span>
4<span class="line">            <span class="token boolean">true</span></span>
5<span class="line">        <span class="token punctuation">]</span></span>
6<span class="line"><span class="token punctuation">}</span></span>
7<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><div class="hint-container tip"><p class="hint-container-title">Tips</p><p><strong>Remember:</strong> the operation list (<code>operaciones</code>) can contain infinite operations, this is only one of them</p></div><h2 id="example-javascript-client-side" tabindex="-1"><a class="header-anchor" href="#example-javascript-client-side"><span>Example (JavaScript client side)</span></a></h2><h3 id="playground" tabindex="-1"><a class="header-anchor" href="#playground"><span>Playground</span></a></h3>`,14)),s("p",null,[a(e,{to:"/playground.html?operacion=EstablecerImpresionAlReves"},{default:p(()=>n[1]||(n[1]=[l("Try it on the Playground")])),_:1})]),a(i,{urlBase:"..",nombreOperacion:"EstablecerImpresionAlReves",ocultarOperacionesDisponibles:!0}),n[6]||(n[6]=o(`<h3 id="code-example" tabindex="-1"><a class="header-anchor" href="#code-example"><span>Code example</span></a></h3><div class="language-javascript line-numbers-mode" data-highlighter="prismjs" data-ext="js" data-title="js"><pre><code><span class="line"><span class="token keyword">const</span> payload <span class="token operator">=</span> <span class="token punctuation">{</span></span>
8<span class="line">    <span class="token string-property property">&quot;serial&quot;</span><span class="token operator">:</span> <span class="token string">&quot;&quot;</span><span class="token punctuation">,</span></span>
9<span class="line">    <span class="token string-property property">&quot;nombreImpresora&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Printers_name&quot;</span><span class="token punctuation">,</span></span>
10<span class="line">    <span class="token string-property property">&quot;operaciones&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span></span>
11<span class="line">
11      <span class="token punctuation">{</span></span>
12<span class="line">        <span class="token string-property property">&quot;nombre&quot;</span><span class="token operator">:</span> <span class="token string">&quot;EstablecerImpresionAlReves&quot;</span><span class="token punctuation">,</span></span>
13<span class="line">        <span class="token string-property property">&quot;argumentos&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span></span>
14<span class="line">          <span class="token boolean">true</span></span>
15<span class="line">        <span class="token punctuation">]</span></span>
16<span class="line">      <span class="token punctuation">}</span></span>
17<span class="line">    <span class="token punctuation">]</span></span>
18<span class="line"><span class="token punctuation">}</span><span class="token punctuation">;</span></span>
19<span class="line"><span class="token keyword">const</span> httpResponse <span class="token operator">=</span> <span class="token keyword">await</span> <span class="token function">fetch</span><span class="token punctuation">(</span><span class="token string">&quot;http://localhost:8000/imprimir&quot;</span><span class="token punctuation">,</span></span>
20<span class="line">    <span class="token punctuation">{</span></span>
21<span class="line">        <span class="token literal-property property">method</span><span class="token operator">:</span> <span class="token string">&quot;POST&quot;</span><span class="token punctuation">,</span></span>
22<span class="line">        <span class="token literal-property property">body</span><span class="token operator">:</span> <span class="token constant">JSON</span><span class="token punctuation">.</span><span class="token function">stringify</span><span class="token punctuation">(</span>payload<span class="token punctuation">)</span><span class="token punctuation">,</span></span>
23<span class="line">    <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span></span>
24<span class="line"></span>
25<span class="line"><span class="token keyword">const</span> jsonResponse <span class="token operator">=</span> <span class="token keyword">await</span> httpResponse<span class="token punctuation">.</span><span class="token function">json</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span></span>
26<span class="line"><span class="token keyword">if</span> <span class="token punctuation">(</span>jsonResponse<span class="token punctuation">.</span>ok<span class="token punctuation">)</span> <span class="token punctuation">{</span></span>
27<span class="line">    <span class="token comment">// Everything is ok</span></span>
28<span class="line">    console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span><span class="token string">&quot;Printed successfully&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span></span>
29<span class="line"><span class="token punctuation">}</span> <span class="token keyword">else</span> <span class="token punctuation">{</span></span>
30<span class="line">    <span class="token comment">// Error message is on message property</span></span>
31<span class="line">    console<span class="token punctuation">.</span><span class="token function">error</span><span class="token punctuation">(</span>jsonResponse<span class="token punctuation">.</span>message<span class="token punctuation">)</span></span>
32<span class="line"><span class="token punctuation">}</span></span>
33<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="example-json-not-encoded" tabindex="-1"><a class="header-anchor" href="#example-json-not-encoded"><span>Example JSON (not encoded)</span></a></h2><p>Encode this JSON and send it to <code>http://localhost:8000/imprimir</code> with POST method</p><div class="language-json line-numbers-mode" data-highlighter="prismjs" data-ext="json" data-title="json"><pre><code><span class="line"><span class="token punctuation">{</span></span>
34<span class="line">    <span class="token property">&quot;serial&quot;</span><span class="token operator">:</span> <span class="token string">&quot;&quot;</span><span class="token punctuation">,</span></span>
35<span class="line">    <span class="token property">&quot;nombreImpresora&quot;</span><span class="token operator">:</span> <span class="token string">&quot;Printers_name&quot;</span><span class="token punctuation">,</span></span>
36<span class="line">    <span class="token property">&quot;operaciones&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span></span>
37<span class="line">
37      <span class="token punctuation">{</span></span>
38<span class="line">        <span class="token property">&quot;nombre&quot;</span><span class="token operator">:</span> <span class="token string">&quot;EstablecerImpresionAlReves&quot;</span><span class="token punctuation">,</span></span>
39<span class="line">        <span class="token property">&quot;argumentos&quot;</span><span class="token operator">:</span> <span class="token punctuation">[</span></span>
40<span class="line">          <span class="token boolean">true</span></span>
41<span class="line">        <span class="token punctuation">]</span></span>
42<span class="line">      <span class="token punctuation">}</span></span>
43<span class="line">    <span class="token punctuation">]</span></span>
44<span class="line"><span class="token punctuation">}</span></span>
45<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="example-json-encoded" tabindex="-1"><a class="header-anchor" href="#example-json-encoded"><span>Example JSON (encoded)</span></a></h2><p>Send this JSON string to <code>http://localhost:8000/imprimir</code> with POST method</p><div class="language-text line-numbers-mode" data-highlighter="prismjs" data-ext="text" data-title="text"><pre><code><span class="line">{&quot;serial&quot;:&quot;&quot;,&quot;nombreImpresora&quot;:&quot;Printers_name&quot;,&quot;operaciones&quot;:[{&quot;nombre&quot;:&quot;EstablecerImpresionAlReves&quot;,&quot;argumentos&quot;:[true]}]}</span>
46<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div>`,8))])}const b=r(d,[["render",m],["__file","upside-down-print.html.vue"]]),h=JSON.parse('{"path":"/esc-pos/upside-down-print.html","title":"Upside down print","lang":"en-US","frontmatter":{},"headers":[{"level":2,"title":"Arguments","slug":"arguments","link":"#arguments","children":[{"level":3,"title":"Enable or disable upside down text print (argumentos[0])","slug":"enable-or-disable-upside-down-text-print-argumentos-0","link":"#enable-or-disable-upside-down-text-print-argumentos-0","children":[]}]},{"level":2,"title":"Operation example","slug":"operation-example","link":"#operation-example","children":[]},{"level":2,"title":"Example (JavaScript client side)","slug":"example-javascript-client-side","link":"#example-javascript-client-side","children":[{"level":3,"title":"Playground","slug":"playground","link":"#playground","children":[]},{"level":3,"title":"Code example","slug":"code-example","link":"#code-example","children":[]}]},{"level":2,"title":"Example JSON (not encoded)","slug":"example-json-not-encoded","link":"#example-json-not-encoded","children":[]},{"level":2,"title":"Example JSON (encoded)","slug":"example-json-encoded","link":"#example-json-encoded","children":[]}],"git":{"updatedTime":1726786024000},"filePathRelative":"esc-pos/upside-down-print.md"}');export{b as comp,h as data};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.