Openbravo Issue Tracking System - POS2
View Issue Details
0048812POS2POSpublic2022-03-16 11:522022-03-22 13:20
ebecerra 
ebecerra 
normalminorhave not tried
closedfixed 
5
 
 
No
0048812: Add a function to OB.App.PrintUtils to generate valid image tag for webUSB/HWM configurations
Add a new function to OB.App.PrintUtils to allow generate the TAG <image> in print templates based on the prinmter (webUSB or hardware manager)
N/A
/**
   * Get image TAG according printer type
   *
   * @param printerType {string} - Printer type (OB.App.TerminalProperty.get('terminal').printertype)
   * @param align {string} - Image align
   * @param base64Data {string} Image code in Base64
   * @returns {string} Tag: <image ...>...</image>
   */
  getImageTagFromBase64: (printerType, align, base64Data) => {
    const imgAlign = align ? ` align="${align}"` : '';
    const type = printerType === 'GENERICUSB' ? '' : ' type="data"';
    const prefix = printerType === 'GENERICUSB' ? 'data:png;base64,' : '';
    return `<image${imgAlign}${type}>${prefix}${base64Data}</image>`;
  }
No tags attached.
has duplicate feature request 0048657 closed fermin_gascon Openbravo ERP Unable to print images stored on database on web usb printers 
Issue History
2022-03-16 11:52ebecerraNew Issue
2022-03-16 11:52ebecerraAssigned To => Retail
2022-03-16 11:52ebecerraTriggers an Emergency Pack => No
2022-03-16 11:53ebecerraAssigned ToRetail => ebecerra
2022-03-16 11:53ebecerraStatusnew => scheduled
2022-03-16 12:00hgbotNote Added: 0135771
2022-03-16 12:55guilleaerSummaryAdd a function to OB.App.PrintUtils => Add a function to OB.App.PrintUtils to generate valid image tag for webUSB/HWM configurations
2022-03-16 12:55guilleaerDescription Updatedbug_revision_view_page.php?rev_id=23781#r23781
2022-03-22 13:20hgbotResolutionopen => fixed
2022-03-22 13:20hgbotStatusscheduled => closed
2022-03-22 13:20hgbotFixed in Version => RR22Q2
2022-03-22 13:20hgbotNote Added: 0135920
2022-03-22 13:20hgbotNote Added: 0135921
2022-03-30 09:48fermin_gasconRelationship addedhas duplicate 0048657

Notes
(0135771)
hgbot   
2022-03-16 12:00   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/747 [^]
(0135920)
hgbot   
2022-03-22 13:20   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 9d2dd3261cbfc595c963777c74efec338d091dce
Author: Eduardo Becerra (OB) <eduardo.becerra@openbravo.com>
Date: 22-03-2022 12:20:15
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/9d2dd3261cbfc595c963777c74efec338d091dce [^]

Fixes ISSUE-48812: Add a function to OB.App.PrintUtils
* Prints base64 encoded images in WebUSB. This makes equivalent printing base64 encoded images with the Hardware Manager and WebUSB.

---
M web/org.openbravo.retail.posterminal/app/webprinter/webprinter.js
---
(0135921)
hgbot   
2022-03-22 13:20   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/747 [^]