Home Forums PrintNode Connector Codeunit IWX PrintNode API Mgt. Reply To: Codeunit IWX PrintNode API Mgt.

Simon BurkeSimon Burke
    Post count: 5

    Got it working…

    Added to app.json

    “dependencies”: [
    “id”: “b0c8bcc7-2924-4cd2-8562-4e71ebd07323”,
    “publisher”: “Insight Works”,
    “name”: “Insight Works PrintNode Connector”,
    “version”: “2.2.7702.0”
    “id”: “ba1776ba-1198-4b4c-a61e-c4612f1880d5”,
    “publisher”: “Insight Works”,
    “name”: “IWorks Common”,
    “version”: “”

    Then added a codeunit to print my label

    codeunit 50131 PrintMyLabel
    TableNo = “Service Item”;
    Trigger OnRun()

    LabelData1 := ‘<STX><ESC>C<ETX><STX><ESC>P<ETX><STX>E4;F4;<ETX><STX>H0;o99,20;f3;c25;h5;w10;d0,30;<ETX><STX>B2;o90,50;f3;c6;h50;w2;i2;d0,10;<ETX><STX>I2;h1;w1;c33;<ETX><STX>R<ESC>E4<CAN><ETX><STX><CR><ETX><STX>’;
    LabelFormat := LabelData1 + rec.”No.” + ‘<ETX><STX><ETB><ETX>’;
    LabelEnum := Enum::”IWX PrintNode Print Type”.FromInteger(1);
    PrintNode.PrintDirect(99999999, ‘Label Print’, LabelEnum, LabelFormat, 1);
    Message(‘Label Printed’)

    LabelData1: Text;
    LabelFormat: Text;

    LabelEnum: Enum “IWX PrintNode Print Type”;
    PrintNode: codeunit “IWX PrintNode API Mgt.”;

    99999999 is where my PrintNode printer id goes.

    I hope this helps someone else doing something similar.