Obtaining Side-by-Side Comparison PDF

This requires two calls - the first to build the PDF and the second to obtain the PDF data from the server for storage client-side.

1. Building the PDF

URL: /segments/remote_generate_comparison_pdf2
Post Data: session_id, target_id

session_id

The unique key returned in the initial login call.

target_id

The value of target_lang_id obtained when the PDF was uploaded.

Returns

On success, a JSON structure containing progress information.
On failure the HTTP status code will be set to something other than 200.

The JSON structure will contain amongst other things, the following fields:

task_id

The unique id of the task which corresponds to a separate thread on the server. Use this id to obtain status information about the task via the remote_task_status call.

2. Getting the PDF Data

URL: /segments/download_comparison_pdf2
Post Data: session_id, target_id

session_id

The unique key returned in the initial login call.

target_id

The value of target_lang_id obtained when the PDF was uploaded.

Returns

The name of the PDF file just downloaded is encoded into the HTTP header. The rest of the content is the file data itself.