Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Export to PDF

Highlighted
James++
Regular Collector

Export to PDF

Hi All,

I am having a requirment in my project to access the exported pdf from external appliacation.

Exactly there is an external web appliaction, in that on one webpage we have to give a link to the PDF (exported Dashboard). But now the problem is we need the dynamic data, i.e. when ever we click the link it should bring the latest data.

Currently what we are doing is that we put the static exported PDF page every day on the server, then we give the link to that PDF.

But now we need the dynamic data, can anyone suggest me what shall I do to implement this.

Thanks in advance.
8 REPLIES
Sascha Mohr
Esteemed Contributor

Re: Export to PDF

Does it have to be PDF?
James++
Regular Collector

Re: Export to PDF

Yes, it has to be PDF.
Sascha Mohr
Esteemed Contributor

Re: Export to PDF

Then you need to be able to generate PDFs on the destination system and have access from there to (parts of) the PPM data model. Like Having Crystal Reports running elswhere being able to access PPM data.
You will need to find a way of dealing with security too then.
The PDF functions will not be sufficient for you. You could call a PPM report from outside and (single-sign-on should be in place) run the PPM report from an additional window in real-time. But these reports usually do not generate PDFs.
James++
Regular Collector

Re: Export to PDF

Hi,

You are correct, but I wa nt to export only one PDF. Some how I manage to get the PDF by using below URL:
http://:/itg/dashboard/app/portal/print/PDFSettings.jsp?USERNAME=&PASSWORD=&pageTitle=Dashboard+Page%3AFY10+IT+Status+&JspScript=/app/portal/print/MaxViewPrint.jsp&JspParams=[[portletId3wQ23265602]]&IS_WINDOID=Y

But here I want to get rid of this PDF setting page, can anyone suggest me.

Thanks
James
Sascha Mohr
Esteemed Contributor

Re: Export to PDF

The URL of the PDF itself is:
http://ppm-host/itg/dashboard/html2pdf/Html2PDFConvertor?JspScript=/app/portal/print/PageViewPrint.jsp&JspParams=[[[pageId[][[206012417[]][[[com.mercury.dashboard.arch.fieldtree.date.zeroTimeUser[][[1267179249619[]][[[com.mercury.dashboard.screen_resolution_width[][[1400[]][[[com.mercury.dashboard.arch.fieldtree.date.timeZone[][[-60[]]&SessionKey=dsh_page_30001_206012417&com.mercury.dashboard.Html2PDFConvertorServlet.innerUsage=Y

But I don't think this is really helpful, because, when I post this into the address field I get an error message (pdf could not be created).
Regards
Sascha
shijub
Super Collector

Re: Export to PDF

Hi ,

 

How can we traverse to itg/dashboard/html2pdf/ link so that we could use the same code for our project.

We tried to find the above link but could not find the same.

 

Thanks in advance.

Utkarsh_Mishra
Honored Contributor

Re: Export to PDF

You cannot use the link as PPM is passing timestamp in the URl, and this changes every second.

 

You can se iText API, PPM internally is using the same API to generate the PDF. 

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)
Etienne_Canaud
HPE Expert

Re: Export to PDF

Hi,

 

Just using iText won't be enough. 

 

In order to create the PDF, PPM renders the page on server side using a headless browser library in a very simple layout (no javascript, simple CSS 1.0) and only then uses iText to export the result to PDF.

 

As far as I can tell, there is no way to easily export the PDF with just one link ; you need first to access the Dashboard page, then click on 'export to PDF' button, then accept settings. If you can somehow automate this on your server page with a headless browser you might get something working, but logging in to PPM could be a bit tricky if you are using SSO. You can try PhantomJS or HtmlUnit as headless browsers. I cannot guarantee it will work, but that's how I would do it. 

 

Thanks,

Etienne.

 

//Add this to "OnDomLoad" event