@ezeep/ngx-ezeep-js 1.0.132 → 1.0.133

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +65 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -2,6 +2,71 @@
2
2
 
3
3
  This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.2.0.
4
4
 
5
+ ## Integration in your Angular App
6
+ Important: You need to set up your server with https!
7
+
8
+ 1. Inside your Angular App, install the package via npm:
9
+
10
+ ```bash
11
+ npm install @ezeep/ezeep-js
12
+ ```
13
+ 2. Import the EzeepJSAngularModule in the module of your choice (e.g. app module)
14
+
15
+ ```typescript
16
+ import { NgModule } from '@angular/core';
17
+ import { BrowserModule } from '@angular/platform-browser';
18
+ import { EzeepJSAngularModule } from '@ezeep/ngx-ezeep-js';
19
+
20
+ import { AppComponent } from './app.component';
21
+
22
+ @NgModule({
23
+ declarations: [
24
+ AppComponent
25
+ ],
26
+ imports: [
27
+ BrowserModule,
28
+ EzeepJSAngularModule
29
+ ],
30
+ providers: [],
31
+ bootstrap: [AppComponent]
32
+ })
33
+ export class AppModule { }
34
+ ```
35
+ 3. Add the **ezp-printing** tag to your html source.
36
+
37
+ ```html
38
+ <ezp-printing></ezp-printing>
39
+ ```
40
+
41
+ There are multiple required and optional attributes the ezp-printing element needs in order to provide the print functionality.
42
+
43
+ | Attribute | Description | Type | Required |
44
+ | --------------- | -------------------------------------------------------------------------------------------------------- | ------- | -------- |
45
+ | **clientid** | Your registered Client-ID (see above). | string | Yes |
46
+ | **redirecturi** | Your registered Redirect Uri (see above). | string | Yes |
47
+ | **fileurl** | A url pointing to a file that should be printed. E.g. https://your-site.com/myfile.pdf | string | Yes |
48
+ | custom | Needs to be set to true, if a custom html element instead of the ezp-printing tag is used (e.g. button). | boolean | No |
49
+ | filename | The name of the file that is printed. | string | No |
50
+ | filetype | The type of the file that is printed. | string | No |
51
+ | hidelogin | If set to true, no additional info popup is shown before the user authentication. | boolean | No |
52
+ | authapihosturl | Overrides the default URL of the authentication API. | string | No |
53
+ | printapihosturl | Overrides the default URL of the printing API. | string | No |
54
+
55
+ ### Example
56
+
57
+ To get started, you can use the default ezeep print button within your angular app:
58
+
59
+ ```html
60
+ <ezp-printing
61
+ clientid="your-client-id"
62
+ redirecturi="https://your-site.com/"
63
+ fileurl="https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"
64
+ filename="dummypdf"
65
+ filetype="pdf"
66
+ >
67
+ </ezp-printing>
68
+ ```
69
+
5
70
  ## Code scaffolding
6
71
 
7
72
  Run `ng generate component component-name --project ngx-ezeep-js` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project ngx-ezeep-js`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ezeep/ngx-ezeep-js",
3
- "version": "1.0.132",
3
+ "version": "1.0.133",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^12.2.0",
6
6
  "@angular/core": "^12.2.0"