This release brings the client up-to-date with the Gotenberg 9 version.
See https://github.com/gotenberg/gotenberg/releases/tag/v9.0.0 for more details.
Breaking Changes
- Minimum PHP version is now PHP 8.3.
Gotenberg::pdfEngines()becomesGotenberg::pdf(): each route is a stage, run withrun()orstages()->pipe().- The post-processing methods of the conversions (
merge(),split(),pdfa(),pdfua(),metadata(),flatten(),encrypt(),allow*(),facturX(),embeds(),optimizeImages(),watermarking(),stamping(),rotating()) become stages.SplitMode,FacturXandEmbedMetadatagive way toStage. - Fields with an engine twin take the
nativeprefix:nativePages(),nativeBookmarks(),nativeTaggedPdf(),nativePdfa(),nativePdfua(),nativeQuality(),nativeWatermark*(), and so on.paperSize()takes aPaperSize,paperDimensions()the width and height. webhook()takes the events URL, which Gotenberg requires; the error webhook is gone.downloadFrom(),cookies()and thefailOn*()methods are variadic,emulatedMediaFeatures()takes an array.Streamexposesfilenameandstreamas readonly properties.- Parameters with a fixed set of values take backed enums instead of strings (
Profile,PaperSize,SameSite,WebhookMethod…).FacturX::CONFORMANCE_*becomesFacturXLevel,EmbedMetadata::RELATIONSHIP_*becomesRelationship.nativePdfua()takes no argument: LibreOffice only writes PDF/UA-1. - JSON encoding errors throw
JsonException. - The deprecated
trace()andgetGotenbergTrace()are removed: usecorrelationId()andgetCorrelationId().
New Methods
$chromium->pdf()/->stages(...)and$libreOffice->stages(...): run a list of stages, in order, on the PDFs a conversion makes.Stagehas a named constructor per Gotenberg stage:merge,split,select,stampText,stampImage,remediate,sign,optimize, and so on. A stage that reads a file takes aStream, which the client uploads for you.Gotenberg::pdf($apiUrl)->stages(...)->pipe(...): run a list of stages on the PDFs you upload, through/forms/pdf/pipe.Gotenberg::pdf($apiUrl)->run(Stage::..., ...): run one stage through its own route,/forms/pdf/merge,/forms/pdf/sign, and so on.Gotenberg::pdf($apiUrl)->info(),->metadata(),->bookmarks(),->attachments(),->form()and->validate(): read PDFs, one JSON entry per PDF.->password()opens encrypted ones.