Skip to main content

Asynchronous jobs

When all conversion backends are saturated, API responds 202 with job_id and queues the request instead of failing or blocking the request. See GET /jobs/{id}.
The markpdf package does not expose streaming fragments (/convert/stream) — it is intended for the typical flow of a mobile app, where you expect the complete result. If you need progressive streaming from your own backend, do it there with Node.js SDK or Python and expose the final result to your Flutter app.

Automatic handling (autoPoll: true)

By default, ConvertOptions.autoPoll is true and all conversion methods (convertFile, convertBytes, convertFromUrl) transparently poll until the result is obtained:

Poll manual

With autoPoll: false, the method returns QueuedResult instead of waiting:

Poll with Stream (to show progress in the UI)

A common pattern in Flutter apps is to expose the job status as Stream<Job> to update a StreamBuilder:
Under normal load conditions you won’t see 202 — it only happens when all backends are saturated. autoPoll: true (the default) already covers it without additional code in most cases.
Results for completed jobs expire in approximately 1 hour. If you save a jobId and receive 404 when querying it, resend the original conversion.