Comments (10)
Encountering this issue as well. Hope it can be patched.
@plaetzchen79 in case it helps I did downgrade to 0.9.0 to check just in case it was related to issue 22 since that seemed related to the printOpenWindow but had the same behavior. Wanted to report and rule that out for you.
from ngx-printer-demo.
Sorry for beeing late.
Do you have any console error output?
What happend? Does the print dialog appear - or nothing happens?
from ngx-printer-demo.
NO error message in console
screen recorded link
https://drive.google.com/file/d/1XLSnXNhtyJIlzsUyHR69-_U2Ey8gmi0n/view
from ngx-printer-demo.
Thank you!!
Call me blind or stupid-but i cant figure out..
- The print window opens in the current window
- Content is shown
3.. it closes correctly and returns to the window
But in 2):
The content is not correct- the content of a shared component is missing?
from ngx-printer-demo.
or is it the fact that a new window opens?
in this case can you try this:
printHTMLElementToCurrent() {
this.printerService.printOpenWindow = false;
this.printerService.printHTMLElement(this.PrintComponent.nativeElement);
this.printerService.printOpenWindow = true;
}
from ngx-printer-demo.
I would assume that if printOpenWindow was set to false then the new tab/window would not open and it would just open up the browsers print.
from ngx-printer-demo.
ahh ok forRoot parameter false boolean check..i will fix this
from ngx-printer-demo.
please try Version 0.9.2
from ngx-printer-demo.
load print page by Ctrl + P
What we are expecting
https://drive.google.com/file/d/1Iyo9M0L-pkXiTjiFGaDarHoAhIOHs6_i/view`
load print page by library service this.printerService.printHTMLElement(this.PrintComponent.nativeElement);
what we get
https://drive.google.com/file/d/1Iyo9M0L-pkXiTjiFGaDarHoAhIOHs6_i/view
also thank you for response
I will try 0.9.2 and info soon
from ngx-printer-demo.
The print window/box open in the current window
but the content of page is now blank
https://drive.google.com/file/d/1rAJf2AmPJVUDb2tjw4nk0Cib1X6-DqK4/view
Am i doing it wrong way or need to add more config
in app.module
NgxPrinterModule.forRoot({printOpenWindow: false});
HTML
<button (click)="printHTMLElementToCurrent()">print</button> <app-print #printContainer ngxPrintItem directPrint="true"> <app-print-header> <app-print-header-mock-up></app-print-header-mock-up> </app-print-header> <app-print-body> <app-print-body-mock-up> </app-print-body-mock-up> </app-print-body> <app-print-footer> </app-print-footer> </app-print>
component
`@ViewChild('printContainer', {read: ElementRef}) PrintComponent: ElementRef | undefined;
constructor(private printerService: NgxPrinterService) { }
ngOnInit(): void {
}
printHTMLElementToCurrent(): void {
this.PrintComponent &&
this.printerService.printHTMLElement(this.PrintComponent.nativeElement);
}`
from ngx-printer-demo.
Related Issues (20)
- Image and canvas not loaded when print HOT 4
- NullInjectorError: No provider for NgxPrinterService! HOT 3
- Compatible with Ivy (angular 10). HOT 3
- Print directly without preview via printservice is not defined in the documentation HOT 3
- Update to Angular 11 HOT 1
- Print selective items inside a div HOT 3
- The `printOpenWindow` can not load the global style.css HOT 3
- Upgrade to Angular 12 and enable evy HOT 1
- Option to add a custom/prefilled filename when saving as pdf HOT 2
- printDiv does not work on mobile browsers HOT 1
- Update to Angular 13 HOT 1
- useExistingCss does not work HOT 1
- White Space on top HOT 1
- Cancel print window not removing default CSS on first page load.
- ngxPrintItemButton with divID is not printing the dropdown values
- ngx-printer element is not higing in Chrome after print dialog on current page HOT 1
- Unable to install ngx-printer HOT 1
- Remove deprecated ComponebtFactoryResolver HOT 1
- Does the mobile browser not work properly?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-printer-demo.