inly/core client Inly\Core\Services\CorePdf\CorePdf. Full HTTP details (curl, query params, responses) live at pdf-services.inlycore.com/docs.
Set
CORE_PDF_API_KEY from 1Password (Inly). You do not need to change the default base URL (https://pdf-services.inlycore.com) unless you use a custom endpoint.Configuration
Values come fromconfig/core-pdf.php (merged from the package). Minimum:
Registering the service
Bind a singleton so you can type-hintCorePdf (the package does not register it globally):
Usage
extract(UploadedFile|string $source): array — Decoded JSON from POST /extract. Throws RuntimeException on failure or invalid JSON.
Uploads and paths use multipart file; HTTPS URL strings use JSON { "url": "..." }.
kids entries depend on the PDF):
The extractor uses
kids (not children) for tree child nodes—terminology from the internal PDF pipeline / @opendataloader/pdf-style output, not a generic JSON tree field name.render(...): string — Raw image bytes from POST /render. Optional named args page (default 1), format (png/jpg), quality, width become query string parameters (see public docs). Throws RuntimeException on HTTP errors or unreadable input. Response Content-Type is image/png or image/jpeg.
isConfigured(), getBaseUrl(), getTimeout() / setTimeout(), getRetryAttempts() / setRetryAttempts(). The HTTP client uses Laravel Http with configurable timeout and retries; non-empty api_key sends Authorization: Bearer.
HTML documents to PDF (Core documents)
Business HTML rendered byCoreDocument is converted to PDF with Spatie Laravel PDF via Inly\Core\Services\Documents\DocumentPdfService, not via CorePdf. CorePdf remains the microservice for extracting and rasterizing existing PDFs. Document PDFs use the paper size stored on each Document (from protected string $format on the document class, default a4).