All Projects β†’ selemxmn β†’ ngx-print

selemxmn / ngx-print

Licence: MIT license
πŸ–¨οΈ A plug n' play Angular (2++) library to print your stuff

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to ngx-print

Learn Angular From Scratch Step By Step
Angular step by step tutorial covering from basic concepts of Angular Framework to building a complete Angular app using Angular Material components. We will go through the main building blocks of an Angular 7 application as well as the best practices for building a complete app with Angular.
Stars: ✭ 140 (+12.9%)
Mutual labels:  angular4, angular-2, angular5, angular6
Ng2 Pdfjs Viewer
An angular 8 component for PDFJS and ViewerJS (Supports angular 2/4/5/6/7)
Stars: ✭ 150 (+20.97%)
Mutual labels:  angular4, angular5, angular6
AuthGuard
Example repo for guarding routes post
Stars: ✭ 42 (-66.13%)
Mutual labels:  angular4, angular5, angular6
file-input-accessor
Angular directive that provides file input functionality in Angular forms.
Stars: ✭ 32 (-74.19%)
Mutual labels:  angular4, angular5, angular6
Angular4-seed
Angular 4 Seed for Angular Forms
Stars: ✭ 37 (-70.16%)
Mutual labels:  angular4, angular-2, angular5
Ng Simple Slideshow
A simple, responsive slideshow for Angular 4+.
Stars: ✭ 119 (-4.03%)
Mutual labels:  angular4, angular5, angular6
spring-websocket-angular6
Example for using Spring Websocket and Angular with Stomp Messaging
Stars: ✭ 18 (-85.48%)
Mutual labels:  angular4, angular5, angular6
Springbootangularhtml5
♨️ Spring Boot 2 + Angular 11 + HTML5 router mode + HTTP interceptor + Lazy loaded modules
Stars: ✭ 89 (-28.23%)
Mutual labels:  angular4, angular5, angular6
Ngx Daterangepicker Material
Pure Angular 2+ date range picker with material design theme, a demo here:
Stars: ✭ 169 (+36.29%)
Mutual labels:  angular4, angular5, angular6
ng-toggle
Bootstrap-styled Angular Toggle Component
Stars: ✭ 14 (-88.71%)
Mutual labels:  angular4, angular5, angular6
Angular5 Seed
Angular5 Seed for Application
Stars: ✭ 222 (+79.03%)
Mutual labels:  angular4, angular5, angular6
Aspnetcore Angular Universal
ASP.NET Core & Angular Universal advanced starter - PWA w/ server-side rendering for SEO, Bootstrap, i18n internationalization, TypeScript, unit testing, WebAPI REST setup, SignalR, Swagger docs, and more! By @TrilonIO
Stars: ✭ 1,455 (+1073.39%)
Mutual labels:  angular4, angular5, angular6
Angular File Uploader
Angular file uploader is an Angular 2/4/5/6/7/8/9/10 + file uploader module with Real-Time Progress Bar, Responsive design, Angular Universal Compatibility, localization and multiple themes which includes Drag and Drop and much more.
Stars: ✭ 92 (-25.81%)
Mutual labels:  angular4, angular5, angular6
angularx-qrcode-sample-app
Angular5/6/7/8/9/10+ sample apps with working implementations of angularx-qrcode
Stars: ✭ 15 (-87.9%)
Mutual labels:  angular4, angular5, angular6
Ng2 Flatpickr
Angular 2+ wrapper for flatpickr (https://github.com/chmln/flatpickr)
Stars: ✭ 91 (-26.61%)
Mutual labels:  angular4, angular5, angular6
Popover
Angular CDK Popover, no default style, examples using @angular/material
Stars: ✭ 156 (+25.81%)
Mutual labels:  angular4, angular5, angular6
Nebular
πŸ’₯ Customizable Angular UI Library based on Eva Design System 🌚✨Dark Mode
Stars: ✭ 7,368 (+5841.94%)
Mutual labels:  angular4, angular5, angular6
Ngx Papaparse
Papa Parse wrapper for Angular
Stars: ✭ 83 (-33.06%)
Mutual labels:  angular4, angular5, angular6
Sb Admin Bs4 Angular 8
Simple Dashboard Admin App built using Angular 8 and Bootstrap 4
Stars: ✭ 1,931 (+1457.26%)
Mutual labels:  angular4, angular5, angular6
Ng Select
⭐ Native angular select component
Stars: ✭ 2,781 (+2142.74%)
Mutual labels:  angular4, angular5, angular6

Coverage Status

ngx-print : plug n' play Angular (2++) directive to print your stuff

This directive makes printing your HTML sections smooth and easy in your Angular application. It is inspired from the old AngularJS ngPrint directive, thus it is intendend to be used with the new Angular -2/4/5/6/7-... Enjoy ! contributions are so welcomed :)

Setup

1- In your root application folder run:

$ npm install ngx-print

2- Once ngx-print is installed, you need to import the main module NgxPrintModule :

import {NgxPrintModule} from 'ngx-print';

@NgModule({
...
imports: [NgxPrintModule, ...],
...
})
export class YourAppModule {
}

3- Then plug n' play with it:

  • Assuming you want to print the following HTML section:
<div>
  <!--Your html stuff that you want to print-->
</div>
<button>print</button> <!--Your relevant print button-->
  • Now, what you have to do is tagging your wanted-to-print section by an id attribute, then link that id to a directive parameter in your button :
 <!--
   1)- Add an ID here
 -->
<div id="print-section"> 
  <!--Your html stuff that you want to print-->
</div>

 <!--
   2)- Add the directive name in your button (ngxPrint),
   3)- Affect your ID to printSectionId
 -->
<button printSectionId="print-section" ngxPrint>print</button> 

Optional properties

  • You want a customized title for your printing window ? you have the choice by adding a new attribute to your print button printTitle:
<div  id="print-section">

<!-- ... -->

</div>

<button  
	printTitle="MyTitle"  
	printSectionId="print-section"  
	ngxPrint>print</button>
  • Also, would you like to customize the printing window style sheet (CSS) ? Hence you can do so by adding infinite styles to another attribute called printStyle:
<div  id="print-section">

<!-- ... -->

</div>

<button
	[printStyle]="{h1 : {'color': 'red'}, h2 : {'border': 'solid 1px'}}"
	printSectionId="print-section"
	ngxPrint>print</button>

Here some simple styles were added to every h1 & h2 tags within the div where print-section is tagged to its id attribute.

  • If you would like to use your existing CSS with media print you can add the useExistingCss attribute:
<div  id="print-section">

<!-- ... -->

</div>

<button
  [useExistingCss]="true"
	printSectionId="print-section"
	ngxPrint>print</button>
  • If you want to customize the printing window style sheet (CSS) by importing the css provided in assets/css use styleSheetFile:
<div  id="print-section">

<!-- ... -->

</div>

<button
  styleSheetFile="assets/css/custom1.css,assets/css/custom2.css"
  printSectionId="print-section"
  ngxPrint>print</button>

Contributors πŸ₯‡

Huge thanks to: deeplotia , Ben L , Gavyn McKenzie , silenceway, Muhammad Ahsan Ayaz and to all ngx-print users

Donation

Did this project help you reducing time? I won't say no to a cup of coffee 🍡 :)

paypal

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].