Welcome Guest Search | Active Topics | Sign In | Register

Printing an angular 2 page Options
jonc
Posted: Thursday, May 11, 2017 6:28:18 PM
Rank: Newbie
Groups: Member

Joined: 5/11/2017
Posts: 1
Hello all,

I have an angular 2 application which I need to generate a pdf from.

I have an api that wraps the eo and I pass it the URL to the page mentioned above as well as the setting to trigger in manual mode.

In the angular application, once the pdf generator renders it, I retrieve some query params out of the URL and make an api call with them.

I subscribe to the observable from the http call and bind the data to the screen.

Then in the lifecycle method ngAfterViewChecked, I check that the data came back and when it did, I call

if (typeof (eoapi) === 'object') {
eoapi.convert();
}

my pdf generator call is timing out.

Has anyone used this tool in an Angular 2 application?

eo_support
Posted: Friday, May 12, 2017 12:59:13 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

This is almost certainly because your eopdf.convert() code is not called. You can add console.log calls in your code and use debug console feature to find out why:

https://www.essentialobjects.com/doc/pdf/htmltopdf/js.aspx

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.