0.0.2-c • Published 5 years ago

js2jprint v0.0.2-c

Weekly downloads
18
License
-
Repository
-
Last release
5 years ago

Angular Javasript 2 Java print without preview. automatically JSON.stringify fix folder import

Import Module

first import module using :

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';

import { JS2JPrintModule } from 'js2jprint/core'

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    JS2JPrintModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Usage

Example

import { Component } from '@angular/core';

import { JS2JPrint, OPrint } from 'js2jprint/core'

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {

  title = 'JS2JPrint';

  constructor(private jsPrint : JS2JPrint){
  }

  print(){
    let oprint : OPrint = {
        data : this.data,
        printer : 'EPSON TM-T82 Receipt',
        type : 'pdf'
    }

    this.jsPrint.print(oprint);
  }
  
  //data : base64
}  
0.0.2-c

5 years ago

0.0.2-b

5 years ago

0.0.2-r

5 years ago

0.0.1-r

5 years ago

0.0.1-b

5 years ago

0.0.1

5 years ago