Service Help – ConvertToPDF
The Sharperlight service offers a wide variety of presentation methods, each with its own set of parameters.
In this post, we will introduce the following method from among the various presentation methods available.
http://abcd.com/mdService1Rest/ConvertToPDF/…
{sharperlight service url}/Help#ConvertToPDF
|
Convert the URL address and return a PDF file.
This requires PrinceXML to be installed to the default location on the SharperLight Server.
To control the default css styling used when converting to PDF, put a file called Page.css in the folder C:\Program Files (x86)\Prince\Engine\bin folder Note: that SharperLight Reports will automatically show ‘Save As PDF’ if PrinceXML is installed
URL example
|
|
| sourceUrl=[encoded_URL] |
The
source URL address to convert to PDF. Make sure the source URL is encode and include the following parameters to ensure PDF friendly HTML is created when dealing with SharperLight reports &prepareAs=PDF &showTitle=1 &usid=XXXXXXXXXX For Example a sourceUrl may look like the following before URL encoding http://abcd.com/mdService1Rest/Report/?query=ADVW.Ranking&usid=0a013ac7e2f749a89fb4139f1b88032bZ&qmode=report&fltCutOff=%3C%3D&fltCutOff_2=100000&fltCutOff2=%3C%3D&fltCutOff2_2=1000000&salt=1346654899101Z&docH=RL&prepareAs=PDF&promptSuppress=1&showTitle=1 |
| timeout=[300] |
Optional. Timeout default to 300 seconds but this can be changed
&timeout=600 |
| options=[xxxx] |
Optional. Prince PDF command line additional arugments
|
