Referencia
MarkpdfClient
java.net.http.HttpClient — don’t create a MarkpdfClient per request; instantiate it once and reuse it (it’s thread-safe).
ConvertOptions
Immutable class built with builder. All fields are optional and use the same defaults as API.
Enums
Methods
convertFile
POST /convert. Blocking.
convertBytes
data as raw body to POST /convert/raw. Blocking.
convertBytesAsync
convertBytes but non-blocking, using HttpClient.sendAsync internally. The CompletableFuture is exceptionally completed with MarkpdfException (wrapped if applicable) in case of error. See Async and jobs.
convertFromUrl
POST /convert/from-url.
pdfIndex
POST /pdf/index. Returns the spine as Map<String, Object> deserialized with Jackson (ObjectMapper.readValue(..., Map.class)), preserving the original JSON structure: pageCount, sections, fontModel, etc.
getJob
GET /jobs/{id}.
waitForJob
GET /jobs/{id} with interval pollInterval until completed/failed or until timeout is exhausted. timeout can be null to wait indefinitely.
