# Get PDF

Fetch an archived PDF document.

Use this when you need the stored PDF for an already processed document.

Use [Preview of invoice](/guides/general-add-ons/preview-of-invoice.md) to generate a preview before delivery.

Use [Local print of invoice](/guides/general-add-ons/local-print-of-invoice.md) when you want to generate a PDF for local printing.

### Prerequisites

The document must already exist in Ropo One.

You must identify the document using **at least one** of these parameters:

* `contractnum`
* `billnum`
* `jobid`

{% hint style="warning" %}
If you send multiple identifiers, make sure they all point to the same document.
{% endhint %}

### Example

```http
GET /jobs/pdf?billnum=<invoice-number>
Accept: application/pdf
```

## GET /jobs/pdf

> Get bill in pdf-format

```json
{"openapi":"3.1.0","info":{"title":"Ropo One","version":"1.0.0"},"tags":[{"name":"jobs","description":"Manage Jobs"}],"servers":[{"url":"/rest","description":"Ropo One"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","bearerFormat":"JWT","scheme":"bearer"}},"schemas":{"JobResponseErrors":{"title":"JobResponseErrors","description":"JobResponseErrors","properties":{"error":{"description":"Error description.","type":"string"}},"type":"object"}}},"paths":{"/jobs/pdf":{"get":{"tags":["jobs"],"summary":"Get bill in pdf-format","operationId":"JobsGetPdfAction","parameters":[{"name":"jobid","in":"query","description":"Id of the job [contractnum, billnum or jobid is required]","required":false,"schema":{"type":"integer"}},{"name":"billnum","in":"query","description":"Billnum of the job [contractnum, billnum or jobid is required]","required":false,"schema":{"type":"string"}},{"name":"contractnum","in":"query","description":"Contractnum of the job [contractnum, billnum or jobid is required]","required":false,"schema":{"type":"string"}},{"name":"documentdate","in":"query","description":"Document date of the job [also contractnum or billnum is required]","required":false,"schema":{"type":"string"}},{"name":"origdata","in":"query","description":"0 = current, 1 = original[default]","required":false,"schema":{"type":"integer"}},{"name":"documenttype","in":"query","description":"Documenttype for Joisto archive.","required":false,"schema":{"type":"string"}},{"name":"joistocolumn","in":"query","description":"Column name in Joisto archive (JobId, Laskunumero, Laskunro)","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns PDF","content":{"application/pdf":{}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResponseErrors"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResponseErrors"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResponseErrors"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dev.ropo.com/guides/general-add-ons/get-pdf.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
