NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev
pub.dev, #4785 most downloaded on pub.dev
Cross-platform PDF toolkit for Flutter. Merge, split, render, extract, search, sign, encrypt, convert, build from scratch. Rust engine, off the main thread.
Latest stable
6.0.0
Last release 12 days ago
09 Nov 2026
Ships unpredictably
gaps range from 1 weeks to 3.4 years
Some releases are documented
notes for 22 of 46 stable releases
2 versions withdrawn
withdrawn after publishing
4 years old
72 releases · first in 2022
Drag across the ruler to compare, or tap a release to open it.
Migrating from 5.0.1: the migration guide has the before and after code for every breaking change below.
6.0.0 runs every operation in bounded engine memory: a 10,000-page file opens, saves, merges and extracts its text in under 16 MB, where it took up to 163 MB. Redaction removes everything under the box, not only the text; compress and every full save write smaller files; and the API is rebuilt around one input type, one page-set type, one error family and three ways to call it. Migrating from 5.0.1: the migration guide has the before and after code for every breaking change below.
flutter pub run pdf_manipulator:setup --force web (native updates itself)DataSource has a new close(), and DataSink has new abort(Object reason) and close(), where the library calls abort on the sink of an operation that ends cancelled or failed → implement all three in your own sources and sinks (clear a buffer, truncate a file, cancel an upload); the built-in ones doFileSource and FileSink.create are await FileSource.open(file) and await FileSink.open(file), and whoever opens a source or sink closes it → await the factory and call close() when the job is overopen, edit, merge, split, compress, sign and every other call that opens a PDF take a PdfInput where they took a DataSource and a password: → write PdfInput(source, password: 'x'); PdfFile(file) and PdfInput.owning open and close the source for the jobPdfDoc is PdfDocument, and pdf.open, pdf.edit and pdf.build return the owning PdfDocumentHandle, PdfEditorHandle and PdfBuilderHandle, the only types with dispose and save → rename the type; pdf.read, pdf.rewrite and pdf.buildTo dispose for youdeletePages, reorderPages, movePage, rotatePages, rotateAllPages, flattenForms, embedFile, watermark, addStamp, addImageStamp and convertToPdfA are removed → call the edit on pdf.editOnce(input, output), for example .removePages(PdfPages.single(0)), or put several edits in one pdf.rewriteapplyRedactions one-shot is removed → call applyRedactions() in a pdf.rewrite bodyeraseRegions and clearEraseRegions, on the editor and as a one-shot, are removed → call redact(page, regions, overlay: const PdfRedactionOverlay.none()), or clearRedactions() to drop queued marksencrypt and decrypt one-shots are removed → call pdf.resave(input, output, save: PdfSave.full(encryption: PdfEncryption.password(ownerPassword: 'x'))), or PdfEncryption.remove() with PdfInput(source, password: 'x') to decryptextractPages is removed → call pdf.editOnce(input, output).keepPages(PdfPages.list([0, 2])) to keep pages in document order, or reorderPages(PdfPageOrder([2, 0])) for another ordersplit, splitBySize and splitByBookmarks are one split(input, sinkFor, by: ...) with PdfSplitRule.every(n), .maxBytes(n) or .bookmarks(), and sinkFor takes the PdfSplitPart it is for → rename the call; it returns the parts (index, first page, end page, bookmark title) and no byte sizescompress has no garbageCollect parameter, since it always collects garbage, and its images default is PdfImagePolicy.lossless where it was ebook → drop the argument, and pass images: PdfImagePolicy.ebook for the old resultimagesToPdf gives every page the image's own size, one point per pixel, where it drew each image on an A4 page → pass page: const PdfImagePage(size: PdfImagePageSize.fixed(PdfPageSize.a4())) to keep A4 pagesconvertTo and convertToPdf are convertToOffice(input, output, format:) and convertFromOffice(document, output, format:), and PdfDocumentFormat is PdfOfficeFormat → rename the calls and the typeregisterFallbackFont takes the font as a DataSource, which it reads whole, where it took Uint8List bytes → wrap the bytes: MemorySource(bytes)title, author, subject, keywords, creator, producer and creationDate of PdfDoc are fields of doc.metadata (PdfMetadata), and creationDate is a UTC DateTime? where it was a raw PDF date string → read doc.metadata.titleisEncrypted, requiresPassword, encryptionAlgorithm and permissions of PdfDoc are fields of doc.encryption (PdfEncryptionInfo), which is null when the document is not encrypted → read doc.encryption?.permissionsPdfDoc.pages is gone, and opening a document no longer reads the pages → call await doc.pageInfo(), or doc.pageInfo(pages: PdfPages.single(0)) for one pagePdfPageInfo has page, mediaBox, cropBox and a PdfRotation rotation, where it had index, an int rotation and width and height as fields (they stay as getters) → read info.page, and compare info.rotation with PdfRotation.r90extract({pages, format}) is text({pages, format}), which returns the string, and extractText(output, {pages, format}), which writes it to a sink as the engine produces it → call await doc.text(); pages is optionalsearch(query:, pages:) is search(query, {pages}), and SearchResult is PdfSearchHit with the same fields → drop the label and rename the typerender returns a Future of the PdfRenderedPage descriptors and writes each page to the sink that sinkFor returns, where it returned a Stream of RenderedPage with the bytes; pages is optional → pass (page) => MemorySink(), or call doc.bitmap(0) for one page's bytesextractImages returns a Future of PdfImageInfo and writes each image to the sink that sinkFor returns, where it returned a Stream of PdfImage with the bytes; pages is optional → pass (image) => sinkPdfRenderSize(maxWidth:, maxHeight:) and PdfRenderSize.thumbnail(n) are PdfRenderSize.fit(maxWidth:, maxHeight:), and PdfRenderSize.dpi(n) is new → rename the constructor; thumbnail(n) is fit(maxWidth: n, maxHeight: n)signatures, formFields, xfa and attachments and the editor's pageCount, version and isModified are methods, where they were getters → add the parentheses: await editor.pageCount()PdfDoc.formField(name) is gone → find the field in await doc.formFields()validatePdfA and validatePdfUa answer a PdfValidationReport (isCompliant, errorCount, warningCount) and take a PdfALevel or PdfUaLevel, where PdfValidationResult had compliant, errors and warnings, validatePdfUa answered a bool and level was an int → read report.isCompliantconvertToPdfA takes a PdfALevel (a1, a2, a3) and defaults to a2, where it took an int and defaulted to level 1 → pass level: PdfALevel.a1 for the old defaultplanSplitByBookmarks is bookmarkRanges(), and PdfBookmarkSplit with startPage and endPage is PdfBookmarkRange with start and end → rename the call and the fieldsclassifyPage is classifyPages({pages}), a page's type string and confidence are a kind (PdfPageKind), and classifyDocument answers a PdfDocumentKind where it answered a PdfDocumentClassification → read result.first.kindPdfFormField has kind (PdfFormFieldKind, with textField, pushButton and signatureField), isReadOnly and isRequired, where it had type (PdfFormFieldType), readOnly and required; PdfCheckedValue.checked is isChecked → rename the fields and the typePdfChoiceValue with the selected option (PdfMultiChoiceValue for several, PdfNoValue for none), where a radio group read as PdfCheckedValue and the others as PdfTextValue → match on PdfChoiceValuesize of PdfAttachment is sizeBytes, serial of PdfCertificateInfo is serialNumber, and regions of PdfRedactionReport is regionCount → rename the fieldsPdfSignatureInfo has a required coversWholeDocument parameter → pass it where you construct one, in test fakes for examplePdfPermissions are canPrint, canPrintHighQuality, canModify, canCopy, canAnnotate, canFillForms, canExtractForAccessibility and canAssemble, where they were print, printHq, modify, copy, annotate, fillForms, accessibility and assemble, and toBits is gone → rename the arguments and the fieldsmonoPpi and minSavings of PdfImagePolicy are bilevelPpi and minSavingsRatio, and PdfImageOutcome has bitsPerComponent, isIndexed, minPpi and placementCount where it had bits, indexed, ppiMin and uses → rename the fieldsrotation of PdfWatermarkStyle is angleDegrees → rename the argumentPdfExtractionFormat.plainText is plain and .text is layout, and PdfEncryptionAlgorithm has rc4Key40, rc4Key128, aesKey128 and aesKey256 where it had rc4_40, rc4_128, aes128 and aes256 → rename the valuesPdfConfig(webLaneWorkerUrl:, maxLanes:) is PdfConfig(webWorkerUrl:, concurrency:) → rename the arguments; concurrency defaults to max(2, cores / 2) operations at oncesetTitle, setAuthor, setSubject, setKeywords, setProducer and setCreationDate of the editor and the builder are one setMetadata(PdfMetadata), which replaces the standard fields, and the editor reads them with metadata() → change one with setMetadata((await editor.metadata()).copyWith(title: 'X'))rotatePage, rotateAllPages and setPageRotation are rotatePages(by:, pages:) and setRotation(rotation, pages:), which take a PdfRotation (r0, r90, r180, r270) where they took degrees: → call rotatePages(by: PdfRotation.r90)pageMediaBox, pageCropBox, setPageMediaBox and setPageCropBox are pageInfo({pages}) with mediaBox and cropBox, setMediaBox(box, {pages}) and setCropBox(box, {pages}) → a null crop box removes the crop boxdeletePage is removePages(PdfPages), which throws PdfEngineFailed for a page the document does not have, or for every page → call removePages(PdfPages.list([1, 3]))selectPages is keepPages(PdfPages), which keeps the pages in document order, and reorderPages(PdfPageOrder), which keeps them in the order given → call reorderPages(PdfPageOrder([2, 0, 1])) to keep the old ordermergeFrom(source, {pages}) is appendPages(PdfInput, {pages}), and pages is a PdfPages where it was a list of indexes → pass PdfInput(source, password: 'x') for an encrypted sourceaddWatermark(page, text) is addWatermark(text, {pages}) with every page as the default, and a page of -1 no longer means every page → pass pages: const PdfPages.all()addStamp(page, type:, rect:) and addImageStamp(page, image, rect:) are addStamp(stamp, bounds:, pages:) and addImageStamp(image, bounds:, pages:), and PdfStampType is PdfStamp → write addStamp(PdfStamp.draft, bounds: r)embedFile is addAttachment → rename the callflattenForms({int? page}) and flattenAnnotations({int? page}) take pages (a PdfPages, every page by default) → write flattenForms(pages: PdfPages.single(0))addRedaction is markRedaction(page, regions, {overlay}), since the engine never drew the overlay text → pass PdfRedactionOverlay.fill(color) for a box of that colour, or PdfRedactionOverlay.none()setFormFieldValue, setCheckboxFieldValue, removeFormField and the other setFormField… methods are on editor.field(name) as setValue, setReadOnly, setRequired, setTooltip, setBounds, setMaxLength, setAlignment, setBackgroundColor, setBorderColor, setBorderWidth, setAppearance, setFlags and remove → write editor.field('name').setValue(const PdfFormFieldValue.text('Ada'))resizeImage and repositionImage are removed, and pageImages returns PdfImagePlacement where it returned PdfPageImage → call setImageBounds(page, name, bounds) with the size and position you wantscrubMetadata and sanitize(PdfSanitizeOptions) are sanitize({stripMetadata, stripJavaScript, stripAttachments}), where PdfSanitizeOptions had metadata, javascript and embeddedFiles → call sanitize(stripJavaScript: false) for scrubMetadata()PdfSaveOptions is PdfSave, and PdfSaveOptions.fullRewrite(compress:, garbageCollect:, encryption:) is PdfSave.full(deflate:, garbageCollect:, encryption:) with a PdfDeflate level; save(output, options:) is save(output, save:) and exists only on the handles → rename the class and the argumentsPdfSaveOptions with incremental() now appends the edits to the original bytes, so a signature over them stays valid, and throws PdfIncrementalRefused when an append cannot carry them (pages removed or reordered, redaction, content edits, an encrypted or repaired source) → catch it and save with PdfSave.full()PdfEncryption.config is PdfEncryption.password(ownerPassword:, userPassword:, algorithm:, permissions:), whose userPassword is null for a document that opens without one and whose algorithm defaults to aesKey256 → rename the callPdfPagesAll, PdfPagesSingle, PdfPagesList, PdfPagesRange, PdfEncryptionKeep, PdfEncryptionRemove, PdfEncryptionConfig, PdfSaveFullRewrite, PdfSaveIncremental, PdfWatermarkCenter, PdfWatermarkCorner, PdfWatermarkTiled, PdfWatermarkExact, PdfPkcs12Credentials and PdfPemCredentials are not exported → call the factory, for example PdfPages.single(0) or PdfEncryption.keep()PdfColor and every result and options type (PdfPageInfo, PdfImagePolicy, PdfRect and the rest) are final with value == and hashCode → replace an extends or implements of one with a wrapperPdfPages.list is not const, sorts the indexes, and throws ArgumentError for an empty list, a negative index or an index given twice, where it kept the list as given; PdfPages.from(start) is new → write PdfPages.list([3, 1])bottom of a PdfRect is its lower edge, y, where it was y + height → read top for the upper edge; PdfRect.fromEdges builds a rectangle from left, bottom, right and topPdfInvalidArgument is removed: a programmer mistake (an empty list, a negative page, a second call on a one-shot) throws ArgumentError or StateError before any I/O, and an engine refusal throws PdfEngineFailed → catch PdfError for runtime failures onlyPdfIoError, PdfEngineError, PdfPageRangeError and PdfCryptoError are PdfIoFailed, PdfEngineFailed, PdfPageOutOfRange and PdfCryptoFailed → rename the type in each catch and switchPdfSearchError and PdfExtractionFailed are removed, since nothing threw them → delete their catch clauses and switch cases; engine failures arrive as the other PdfError subtypesPdfError has two new subtypes, PdfNotFound (a missing attachment or image) and PdfIncrementalRefused → add a case to every exhaustive switch over PdfErroraddA4Page, addLetterPage and addPage(width:, height:) are addPage([PdfPageSize]) → call addPage(), addPage(PdfPageSize.letter()) or addPage(PdfPageSize.points(400, 300))font and at are setFont(name, size) and moveTo(PdfPoint(x, y)), and done() and newPageSameSize() are removed → a page ends when the next is added or the document is savedfieldKeystroke, fieldFormat, fieldValidate and fieldCalculate, and its linkUrl and linkPage, are arguments of the call that writes the field or text → pass scripts: const PdfFieldScripts(format: 'x') or link: const PdfLink.url('https://example.com')textField takes value where it took defaultValue, checkbox takes isChecked where it took checked, and radioGroup takes PdfRadioOption(value, bounds) where options were records → rename the argumentsPdfTextAlignment is PdfAlignment, and the page builder's image(data, rect, {altText}) is image(data, bounds, {altText}) where a null altText places an artifact → rename the type; pass altText: 'x' for a described imageredact(page, regions, {overlay}), which marks and applies its own regions in one step and returns the report — marks queued before stay queued, and an error leaves nothing marked or appliedPdfRedactionOverlay, fill(color) or none(): a redaction with no overlay removes the content and draws no boxPdfEditor.clearRedactions(), and field(name).setTooltip, setMaxLength, setBackgroundColor and setBorderColor take null to remove the tooltip, the limit or the colourPdfFormFieldValue.choice, .choices and .none: field(name).setValue selects an option of a combo box or list box, the options of a multi-select list box, or clears the value, and refuses an option the field does not listPdfDocument.annotations(page), which lists a page's annotations (subtype, rectangle, contents, author, form field name) as PdfAnnotationInfoappendText, textIn, rect, line, stickyNote(..., at:), stamp(PdfStamp...), freeText, onOpen, onClose and table(columns, rows, {options}) with PdfTableCell and PdfTableOptions, and a PdfTextStyle, PdfMarkup or PdfLink argument on textPdfBuilder.addImagePage, a page that holds one picture and takes the picture's own size unless you name onePdfBuilder.save to Flate-compress page content and font streams; save(output, deflate: false) keeps them plain for debuggingBlobSource (package:pdf_manipulator/web.dart), which the worker reads in place with FileReaderSync in JSPI, Atomics and Asyncify, and copies to OPFS itself in OPFS mode: a File from a picker opens with no main-thread read and O(1) memory at any sizeasyncify: true under hooks: user_defines: pdf_manipulator:, which ships the Asyncify wasm so a browser with neither JSPI nor SharedArrayBuffer streams instead of copying to storage first — it is 28 MB for the full engine and is fetched only where OPFS cannot runpdf_oxide_manifest.json, which the browser joins into one stream as it compiles, so no file reaches the 25 MiB limit of static hosts; apps that list pdf_oxide_bg.wasm re-run setup and list the partsSharedArrayBuffer, then JSPI, OPFS and Asyncify, since Atomics measured faster than JSPI on every sourceopen, edit, split, a full-rewrite save and compress to hold a bounded window of the document instead of all of it: a 38 MB, 10,000-page file now opens and saves in under 16 MB of engine memory, where it took up to 85 MBedit to open the source once; an editor used to hold the document twiceappendPages to keep the merged file open until the editor is disposed and copy its objects one at a time at save: merging a 10,000-page file takes under 16 MB of engine memory and about 2 seconds, where it took 163 MB and minutesremovePages, movePage, keepPages, rotation, media box and crop box apply to a merged page, where they refused, hit the wrong page or crashed the engine; stamps, watermarks and redactions on a merged page throw PdfUnsupportedrender and extractImages to deliver each page or image to its sink as the engine produces it, where they held every page until the last; cancelling the task stops the engineaddAttachment, extractAttachment, addImageStamp, convertToPdfA, a page's image list, a large rewritten stream and the text of form fields to be read and written in pieces, never whole: a 64 MiB attachment or image goes in or out in under 16 MB of engine memoryrender, reduceImages, extractImages and imagesToPdf (JPEG, fax, interlaced PNG, palettes, raw samples, CIDToGIDMap fonts) to read only what the file declares, from the stream, so a 64 MiB image stays under 16 MB of engine memory; a fax image the engine cannot read is declined at its openapplyRedactions to rewrite each page one operator at a time while the document saves: redacting a page with 9 million operators takes under 1 MB of engine memoryPdfSave.full(useObjectStreams: false) writes the classic layoutPdfSave.full(deflate:), how hard a full save deflates its streams (PdfDeflate.none, fast, balanced or best, default best); a full save re-deflates Flate streams at that level and keeps a stream's source bytes when the result is not smaller (#268 reported by @DarkWingMcQuack)compress and every full save to recompress copied page content, pack object streams fuller, drop orphan /Length objects, rewrite LZW as Flate and deflate like zlib level 9: on 13 public test files a lossless compress is smaller than pdf_document 12.0.0's on 12 and equal on 1, where it was up to 6 times larger (#268 reported by @DarkWingMcQuack)compress to write the source unchanged when its result is not smaller (#268 reported by @DarkWingMcQuack)compress to write one copy of identical images, ICC profiles and embedded fonts; PdfSave.full(mergeDuplicates: true) does the same for any full save, across every merged source (#268 reported by @DarkWingMcQuack)compress to drop the fonts, images, colour spaces and other resources a page lists but no content of it uses, keeping any resource some content might use; PdfSave.full(pruneResources: true) does the same for any full save (#268 reported by @DarkWingMcQuack)compress to subset embedded TrueType and CID CFF fonts: outlines no content shows are emptied, glyph ids and tables kept, fonts of form fields left whole; a subset that is not smaller is not written (#268 reported by @DarkWingMcQuack)PdfImagePolicy.screen to re-encode a stored JPEG at its quality even when the image is not downsampled (recompressJpeg: true); ebook and print still keep stored JPEGsverifySignatures to check each signature's digest and signer key, where it returned false for every document; PdfSignatureInfo has isValid, coversWholeDocument and signingTime filledregisterFallbackFont so a second registration of a kind replaces the first and reaches only the Pdf that made it, where the font was shared by every instance of the processreduceImages, convertToPdfA, image bounds changes and saves within one page or operator, and to reach merge, split, compress, rendering, bookmarkRanges, classifyPages and the opening of a damaged file, where each ran to its end; on the web this needs a cross-origin isolated pagecancel() when the operation finished before the cancel landed: the task resolves with its result, so a finished edit is not reported as cancelled; an open or edit that finished is closed and reports PdfCancelledPdf instances to lease their web workers and native threads from one shared pool, so creating and disposing instances in a loop reuses them instead of starting a new one each timeconvertFromOffice and convertToOffice to bound hostile .doc, .xls, .ppt and ZIP input, to keep what a cut-off .docx, .pptx or .xlsx holds before the damage, and to write DOCX tables with no widths that Word no longer collapses (office_oxide 0.1.16)build: size, build: debug, a trimmed keep:) to 1.93 or newer, since the engine's per-thread memory count needs it on Android; the build says so and names the rustup commandrender now adds 2.4 MB where it added 4.8 MB, and office adds 5.4 MB where it added 2.9 MBkeepPages, split and removePages writing the pages they drop into the output, so the output kept its original size and the dropped pages' text, images and form values — a save now writes nothing only a dropped page reaches, and drops the links, bookmark targets and form fields that pointed at one (#261 reported by @crurui)sign dropping the document's bookmarks, form fields, page labels and every other catalog entry, and replacing an earlier signature — the signature now appends to the existing form and page (#263)sign writing a cross-reference table that other readers had to repair — each entry is now 20 bytesPdfSignatureInfo showing a non-ASCII signer name, reason or location as garbled text — UTF-16 text strings are decodedPdfEncryptionInfo.permissions reporting the wrong flags (a print-allowed file read as canPrint: false) — the engine's /P word is read at its spec bit positionsmarkRedaction without applyRedactions drawing a black box over text it never removed, so the file looked redacted and the text could still be copied — an unapplied redaction is saved as a redaction mark (a /Redact annotation) and the page content is left as it wasapplyRedactions leaving the pixels of images under a redacted area in the file — a covered image is removed, a partly covered one is copied with the covered pixels filled (only the 8×8 blocks under the area for a JPEG), masks included, and other pages keep the originalapplyRedactions leaving drawings, clip shapes, gradient meshes and form content under a redacted area in the file — they are removed or cut at the area's edge, and a form other pages show is copied for the redacted page onlyapplyRedactions leaving traces of the removed text in the file: font widths, Unicode mappings, Type 3 glyph procedures (a flattened field's font included) and alt text, in the structure tree or inside page content — entries only the removed text used are clearedapplyRedactions dropping every annotation on a redacted page — only the annotations under a redacted area go, with their form fieldsapplyRedactions refused on a later page leaving the earlier pages redacted while the call reported the error — it redacts every page or nonereduceImages leaving the images it had already re-encoded staged, so a later save wrote half the reduction — it stages nothing unless every image is doneconvertToPdfA leaving the editor half converted, or converted while the call reported the error — the editor is as it was before the callkeepPages, split, removePages or a reorder — each kept page keeps its labelPdfPageInfo.label always being null — it now holds the page's label when the document has page labelsmerge or any other multi-source op shifting every source after it, so the op read the wrong documents — an empty input now throws PdfCorruptedcompress and every other full-rewrite save dropping the document's title, author, dates and file identifier unless the title was edited — the saved file keeps the source's /Info and /ID, and an edited title replaces the old /Info instead of leaving it behindcompress and every other rewriting save could not be compared or cached by hash — objects are written in id order, so only the random AES IVs of an encrypted save differ/Size writing new objects over existing ones, and dropping an object it could not read without a word — it now throws PdfCorruptedrotatePages and other per-page edits slowing down with the square of the page count on large documentsflattenForms() and flattenAnnotations() of every page leaving pages unflattened after a page was deleted or moved, addImageStamp stamping the page the index named before the deletion, and a second image stamp on a page replacing the firstPdfPageBuilder.radioGroup always failing with "unknown pageOp"formFields misreading a field whose type, flags or value live on an ancestor field (a radio group read as a checkbox), and reporting a nameless parent as a field with an empty nameimage() with bytes that are not an image succeeding and drawing nothing — it throws PdfEngineFailedPdfPageOutOfRange with the page and the page countPdfCorrupted — it now throws PdfIoFailed, so a broken source is told from a broken filePdfIoFailedrender and extractImages returning an empty stream when the engine failed, a page past the end included — they throw the engine's errorrender ignoring line width, caps, joins, miter limit and dashes set through a graphics state resource (gs), which drew such lines 1 pt wide and solidrender drawing outlined text (text rendering modes 1, 2, 5 and 6) filled in the fill colour — the glyph outline is stroked in the stroke colour and line stylerender drawing strokes and text painted with a tiling pattern in a flat colour — the pattern now shows inside the stroke or the glyphsrender coming out smaller than asked on pages with a crop boxopen or edit keeping its source channel until the instance was disposedcancel() on a job still waiting behind another one waiting for that job to end — it resolves at once; on JSPI a cancel during a sink write no longer waits for the writePdf fail — the next operation starts a worker againbuilder.save, editor.save and extractAttachment succeeding in web OPFS mode when the sink threw, and a slow sink piling chunks up in memory — the worker now spools output to disk and the sink is awaited chunk by chunk, so its error fails the opPdf that was never disposed keeping its workers, lanes and registered fonts for good — they are released when it is garbage collected, with a debug warning( or < unescaped, so the name ended early and the rest of its dictionary was misread — delimiters are written as #XX@DarkWingMcQuack on the compress bullets of 6.0.0-dev.0 (#278)dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v6.0.0dependencies:
pdf_manipulator: ^6.0.0Your coding agent can read these notes before it upgrades. Set up the MCP server →
Migrating from 5.0.1: the migration guide has the before and after code for every breaking change below.
6.0.0 runs every operation in bounded engine memory: a 10,000-page file opens, saves, merges and extracts its text in under 16 MB, where it took up to 163 MB. Redaction removes everything under the box, not only the text; compress and every full save write smaller files; and the API is rebuilt around one input type, one page-set type, one error family and three ways to call it. Migrating from 5.0.1: the migration guide has the before and after code for every breaking change below.
flutter pub run pdf_manipulator:setup --force web (native updates itself)DataSource has a new close(), and DataSink has new abort(Object reason) and close(), where the library calls abort on the sink of an operation that ends cancelled or failed → implement all three in your own sources and sinks (clear a buffer, truncate a file, cancel an upload); the built-in ones doFileSource and FileSink.create are await FileSource.open(file) and await FileSink.open(file), and whoever opens a source or sink closes it → await the factory and call close() when the job is overopen, edit, merge, split, compress, sign and every other call that opens a PDF take a PdfInput where they took a DataSource and a password: → write PdfInput(source, password: 'x'); PdfFile(file) and PdfInput.owning open and close the source for the jobPdfDoc is PdfDocument, and pdf.open, pdf.edit and pdf.build return the owning PdfDocumentHandle, PdfEditorHandle and PdfBuilderHandle, the only types with dispose and save → rename the type; pdf.read, pdf.rewrite and pdf.buildTo dispose for youdeletePages, reorderPages, movePage, rotatePages, rotateAllPages, flattenForms, embedFile, watermark, addStamp, addImageStamp and convertToPdfA are removed → call the edit on pdf.editOnce(input, output), for example .removePages(PdfPages.single(0)), or put several edits in one pdf.rewriteapplyRedactions one-shot is removed → call applyRedactions() in a pdf.rewrite bodyeraseRegions and clearEraseRegions, on the editor and as a one-shot, are removed → call redact(page, regions, overlay: const PdfRedactionOverlay.none()), or clearRedactions() to drop queued marksencrypt and decrypt one-shots are removed → call pdf.resave(input, output, save: PdfSave.full(encryption: PdfEncryption.password(ownerPassword: 'x'))), or PdfEncryption.remove() with PdfInput(source, password: 'x') to decryptextractPages is removed → call pdf.editOnce(input, output).keepPages(PdfPages.list([0, 2])) to keep pages in document order, or reorderPages(PdfPageOrder([2, 0])) for another ordersplit, splitBySize and splitByBookmarks are one split(input, sinkFor, by: ...) with PdfSplitRule.every(n), .maxBytes(n) or .bookmarks(), and sinkFor takes the PdfSplitPart it is for → rename the call; it returns the parts (index, first page, end page, bookmark title) and no byte sizescompress has no garbageCollect parameter, since it always collects garbage, and its images default is PdfImagePolicy.lossless where it was ebook → drop the argument, and pass images: PdfImagePolicy.ebook for the old resultimagesToPdf gives every page the image's own size, one point per pixel, where it drew each image on an A4 page → pass page: const PdfImagePage(size: PdfImagePageSize.fixed(PdfPageSize.a4())) to keep A4 pagesconvertTo and convertToPdf are convertToOffice(input, output, format:) and convertFromOffice(document, output, format:), and PdfDocumentFormat is PdfOfficeFormat → rename the calls and the typeregisterFallbackFont takes the font as a DataSource, which it reads whole, where it took Uint8List bytes → wrap the bytes: MemorySource(bytes)title, author, subject, keywords, creator, producer and creationDate of PdfDoc are fields of doc.metadata (PdfMetadata), and creationDate is a UTC DateTime? where it was a raw PDF date string → read doc.metadata.titleisEncrypted, requiresPassword, encryptionAlgorithm and permissions of PdfDoc are fields of doc.encryption (PdfEncryptionInfo), which is null when the document is not encrypted → read doc.encryption?.permissionsPdfDoc.pages is gone, and opening a document no longer reads the pages → call await doc.pageInfo(), or doc.pageInfo(pages: PdfPages.single(0)) for one pagePdfPageInfo has page, mediaBox, cropBox and a PdfRotation rotation, where it had index, an int rotation and width and height as fields (they stay as getters) → read info.page, and compare info.rotation with PdfRotation.r90extract({pages, format}) is text({pages, format}), which returns the string, and extractText(output, {pages, format}), which writes it to a sink as the engine produces it → call await doc.text(); pages is optionalsearch(query:, pages:) is search(query, {pages}), and SearchResult is PdfSearchHit with the same fields → drop the label and rename the typerender returns a Future of the PdfRenderedPage descriptors and writes each page to the sink that sinkFor returns, where it returned a Stream of RenderedPage with the bytes; pages is optional → pass (page) => MemorySink(), or call doc.bitmap(0) for one page's bytesextractImages returns a Future of PdfImageInfo and writes each image to the sink that sinkFor returns, where it returned a Stream of PdfImage with the bytes; pages is optional → pass (image) => sinkPdfRenderSize(maxWidth:, maxHeight:) and PdfRenderSize.thumbnail(n) are PdfRenderSize.fit(maxWidth:, maxHeight:), and PdfRenderSize.dpi(n) is new → rename the constructor; thumbnail(n) is fit(maxWidth: n, maxHeight: n)signatures, formFields, xfa and attachments and the editor's pageCount, version and isModified are methods, where they were getters → add the parentheses: await editor.pageCount()PdfDoc.formField(name) is gone → find the field in await doc.formFields()validatePdfA and validatePdfUa answer a PdfValidationReport (isCompliant, errorCount, warningCount) and take a PdfALevel or PdfUaLevel, where PdfValidationResult had compliant, errors and warnings, validatePdfUa answered a bool and level was an int → read report.isCompliantconvertToPdfA takes a PdfALevel (a1, a2, a3) and defaults to a2, where it took an int and defaulted to level 1 → pass level: PdfALevel.a1 for the old defaultplanSplitByBookmarks is bookmarkRanges(), and PdfBookmarkSplit with startPage and endPage is PdfBookmarkRange with start and end → rename the call and the fieldsclassifyPage is classifyPages({pages}), a page's type string and confidence are a kind (PdfPageKind), and classifyDocument answers a PdfDocumentKind where it answered a PdfDocumentClassification → read result.first.kindPdfFormField has kind (PdfFormFieldKind, with textField, pushButton and signatureField), isReadOnly and isRequired, where it had type (PdfFormFieldType), readOnly and required; PdfCheckedValue.checked is isChecked → rename the fields and the typePdfChoiceValue with the selected option (PdfMultiChoiceValue for several, PdfNoValue for none), where a radio group read as PdfCheckedValue and the others as PdfTextValue → match on PdfChoiceValuesize of PdfAttachment is sizeBytes, serial of PdfCertificateInfo is serialNumber, and regions of PdfRedactionReport is regionCount → rename the fieldsPdfSignatureInfo has a required coversWholeDocument parameter → pass it where you construct one, in test fakes for examplePdfPermissions are canPrint, canPrintHighQuality, canModify, canCopy, canAnnotate, canFillForms, canExtractForAccessibility and canAssemble, where they were print, printHq, modify, copy, annotate, fillForms, accessibility and assemble, and toBits is gone → rename the arguments and the fieldsmonoPpi and minSavings of PdfImagePolicy are bilevelPpi and minSavingsRatio, and PdfImageOutcome has bitsPerComponent, isIndexed, minPpi and placementCount where it had bits, indexed, ppiMin and uses → rename the fieldsrotation of PdfWatermarkStyle is angleDegrees → rename the argumentPdfExtractionFormat.plainText is plain and .text is layout, and PdfEncryptionAlgorithm has rc4Key40, rc4Key128, aesKey128 and aesKey256 where it had rc4_40, rc4_128, aes128 and aes256 → rename the valuesPdfConfig(webLaneWorkerUrl:, maxLanes:) is PdfConfig(webWorkerUrl:, concurrency:) → rename the arguments; concurrency defaults to max(2, cores / 2) operations at oncesetTitle, setAuthor, setSubject, setKeywords, setProducer and setCreationDate of the editor and the builder are one setMetadata(PdfMetadata), which replaces the standard fields, and the editor reads them with metadata() → change one with setMetadata((await editor.metadata()).copyWith(title: 'X'))rotatePage, rotateAllPages and setPageRotation are rotatePages(by:, pages:) and setRotation(rotation, pages:), which take a PdfRotation (r0, r90, r180, r270) where they took degrees: → call rotatePages(by: PdfRotation.r90)pageMediaBox, pageCropBox, setPageMediaBox and setPageCropBox are pageInfo({pages}) with mediaBox and cropBox, setMediaBox(box, {pages}) and setCropBox(box, {pages}) → a null crop box removes the crop boxdeletePage is removePages(PdfPages), which throws PdfEngineFailed for a page the document does not have, or for every page → call removePages(PdfPages.list([1, 3]))selectPages is keepPages(PdfPages), which keeps the pages in document order, and reorderPages(PdfPageOrder), which keeps them in the order given → call reorderPages(PdfPageOrder([2, 0, 1])) to keep the old ordermergeFrom(source, {pages}) is appendPages(PdfInput, {pages}), and pages is a PdfPages where it was a list of indexes → pass PdfInput(source, password: 'x') for an encrypted sourceaddWatermark(page, text) is addWatermark(text, {pages}) with every page as the default, and a page of -1 no longer means every page → pass pages: const PdfPages.all()addStamp(page, type:, rect:) and addImageStamp(page, image, rect:) are addStamp(stamp, bounds:, pages:) and addImageStamp(image, bounds:, pages:), and PdfStampType is PdfStamp → write addStamp(PdfStamp.draft, bounds: r)embedFile is addAttachment → rename the callflattenForms({int? page}) and flattenAnnotations({int? page}) take pages (a PdfPages, every page by default) → write flattenForms(pages: PdfPages.single(0))addRedaction is markRedaction(page, regions, {overlay}), since the engine never drew the overlay text → pass PdfRedactionOverlay.fill(color) for a box of that colour, or PdfRedactionOverlay.none()setFormFieldValue, setCheckboxFieldValue, removeFormField and the other setFormField… methods are on editor.field(name) as setValue, setReadOnly, setRequired, setTooltip, setBounds, setMaxLength, setAlignment, setBackgroundColor, setBorderColor, setBorderWidth, setAppearance, setFlags and remove → write editor.field('name').setValue(const PdfFormFieldValue.text('Ada'))resizeImage and repositionImage are removed, and pageImages returns PdfImagePlacement where it returned PdfPageImage → call setImageBounds(page, name, bounds) with the size and position you wantscrubMetadata and sanitize(PdfSanitizeOptions) are sanitize({stripMetadata, stripJavaScript, stripAttachments}), where PdfSanitizeOptions had metadata, javascript and embeddedFiles → call sanitize(stripJavaScript: false) for scrubMetadata()PdfSaveOptions is PdfSave, and PdfSaveOptions.fullRewrite(compress:, garbageCollect:, encryption:) is PdfSave.full(deflate:, garbageCollect:, encryption:) with a PdfDeflate level; save(output, options:) is save(output, save:) and exists only on the handles → rename the class and the argumentsPdfSaveOptions with incremental() now appends the edits to the original bytes, so a signature over them stays valid, and throws PdfIncrementalRefused when an append cannot carry them (pages removed or reordered, redaction, content edits, an encrypted or repaired source) → catch it and save with PdfSave.full()PdfEncryption.config is PdfEncryption.password(ownerPassword:, userPassword:, algorithm:, permissions:), whose userPassword is null for a document that opens without one and whose algorithm defaults to aesKey256 → rename the callPdfPagesAll, PdfPagesSingle, PdfPagesList, PdfPagesRange, PdfEncryptionKeep, PdfEncryptionRemove, PdfEncryptionConfig, PdfSaveFullRewrite, PdfSaveIncremental, PdfWatermarkCenter, PdfWatermarkCorner, PdfWatermarkTiled, PdfWatermarkExact, PdfPkcs12Credentials and PdfPemCredentials are not exported → call the factory, for example PdfPages.single(0) or PdfEncryption.keep()PdfColor and every result and options type (PdfPageInfo, PdfImagePolicy, PdfRect and the rest) are final with value == and hashCode → replace an extends or implements of one with a wrapperPdfPages.list is not const, sorts the indexes, and throws ArgumentError for an empty list, a negative index or an index given twice, where it kept the list as given; PdfPages.from(start) is new → write PdfPages.list([3, 1])bottom of a PdfRect is its lower edge, y, where it was y + height → read top for the upper edge; PdfRect.fromEdges builds a rectangle from left, bottom, right and topPdfInvalidArgument is removed: a programmer mistake (an empty list, a negative page, a second call on a one-shot) throws ArgumentError or StateError before any I/O, and an engine refusal throws PdfEngineFailed → catch PdfError for runtime failures onlyPdfIoError, PdfEngineError, PdfPageRangeError and PdfCryptoError are PdfIoFailed, PdfEngineFailed, PdfPageOutOfRange and PdfCryptoFailed → rename the type in each catch and switchPdfSearchError and PdfExtractionFailed are removed, since nothing threw them → delete their catch clauses and switch cases; engine failures arrive as the other PdfError subtypesPdfError has two new subtypes, PdfNotFound (a missing attachment or image) and PdfIncrementalRefused → add a case to every exhaustive switch over PdfErroraddA4Page, addLetterPage and addPage(width:, height:) are addPage([PdfPageSize]) → call addPage(), addPage(PdfPageSize.letter()) or addPage(PdfPageSize.points(400, 300))font and at are setFont(name, size) and moveTo(PdfPoint(x, y)), and done() and newPageSameSize() are removed → a page ends when the next is added or the document is savedfieldKeystroke, fieldFormat, fieldValidate and fieldCalculate, and its linkUrl and linkPage, are arguments of the call that writes the field or text → pass scripts: const PdfFieldScripts(format: 'x') or link: const PdfLink.url('https://example.com')textField takes value where it took defaultValue, checkbox takes isChecked where it took checked, and radioGroup takes PdfRadioOption(value, bounds) where options were records → rename the argumentsPdfTextAlignment is PdfAlignment, and the page builder's image(data, rect, {altText}) is image(data, bounds, {altText}) where a null altText places an artifact → rename the type; pass altText: 'x' for a described imageredact(page, regions, {overlay}), which marks and applies its own regions in one step and returns the report — marks queued before stay queued, and an error leaves nothing marked or appliedPdfRedactionOverlay, fill(color) or none(): a redaction with no overlay removes the content and draws no boxPdfEditor.clearRedactions(), and field(name).setTooltip, setMaxLength, setBackgroundColor and setBorderColor take null to remove the tooltip, the limit or the colourPdfFormFieldValue.choice, .choices and .none: field(name).setValue selects an option of a combo box or list box, the options of a multi-select list box, or clears the value, and refuses an option the field does not listPdfDocument.annotations(page), which lists a page's annotations (subtype, rectangle, contents, author, form field name) as PdfAnnotationInfoappendText, textIn, rect, line, stickyNote(..., at:), stamp(PdfStamp...), freeText, onOpen, onClose and table(columns, rows, {options}) with PdfTableCell and PdfTableOptions, and a PdfTextStyle, PdfMarkup or PdfLink argument on textPdfBuilder.addImagePage, a page that holds one picture and takes the picture's own size unless you name onePdfBuilder.save to Flate-compress page content and font streams; save(output, deflate: false) keeps them plain for debuggingBlobSource (package:pdf_manipulator/web.dart), which the worker reads in place with FileReaderSync in JSPI, Atomics and Asyncify, and copies to OPFS itself in OPFS mode: a File from a picker opens with no main-thread read and O(1) memory at any sizeasyncify: true under hooks: user_defines: pdf_manipulator:, which ships the Asyncify wasm so a browser with neither JSPI nor SharedArrayBuffer streams instead of copying to storage first — it is 28 MB for the full engine and is fetched only where OPFS cannot runpdf_oxide_manifest.json, which the browser joins into one stream as it compiles, so no file reaches the 25 MiB limit of static hosts; apps that list pdf_oxide_bg.wasm re-run setup and list the partsSharedArrayBuffer, then JSPI, OPFS and Asyncify, since Atomics measured faster than JSPI on every sourceopen, edit, split, a full-rewrite save and compress to hold a bounded window of the document instead of all of it: a 38 MB, 10,000-page file now opens and saves in under 16 MB of engine memory, where it took up to 85 MBedit to open the source once; an editor used to hold the document twiceappendPages to keep the merged file open until the editor is disposed and copy its objects one at a time at save: merging a 10,000-page file takes under 16 MB of engine memory and about 2 seconds, where it took 163 MB and minutesremovePages, movePage, keepPages, rotation, media box and crop box apply to a merged page, where they refused, hit the wrong page or crashed the engine; stamps, watermarks and redactions on a merged page throw PdfUnsupportedrender and extractImages to deliver each page or image to its sink as the engine produces it, where they held every page until the last; cancelling the task stops the engineaddAttachment, extractAttachment, addImageStamp, convertToPdfA, a page's image list, a large rewritten stream and the text of form fields to be read and written in pieces, never whole: a 64 MiB attachment or image goes in or out in under 16 MB of engine memoryrender, reduceImages, extractImages and imagesToPdf (JPEG, fax, interlaced PNG, palettes, raw samples, CIDToGIDMap fonts) to read only what the file declares, from the stream, so a 64 MiB image stays under 16 MB of engine memory; a fax image the engine cannot read is declined at its openapplyRedactions to rewrite each page one operator at a time while the document saves: redacting a page with 9 million operators takes under 1 MB of engine memoryPdfSave.full(useObjectStreams: false) writes the classic layoutPdfSave.full(deflate:), how hard a full save deflates its streams (PdfDeflate.none, fast, balanced or best, default best); a full save re-deflates Flate streams at that level and keeps a stream's source bytes when the result is not smallercompress and every full save to recompress copied page content, pack object streams fuller, drop orphan /Length objects, rewrite LZW as Flate and deflate like native zlib level 9: on 13 public test files a lossless compress is now smaller than pdf_document 12.0.0's on 12 and equal on 1, where it was up to 6 times largercompress to write the source unchanged when its result is not smallercompress to write one copy of identical images, ICC profiles and embedded fonts; PdfSave.full(mergeDuplicates: true) does the same for any full save, across every merged sourcecompress to drop the fonts, images, colour spaces and other resources a page lists but no content of it uses, keeping any resource some content might use; PdfSave.full(pruneResources: true) does the same for any full savecompress to subset embedded TrueType and CID CFF fonts: outlines no content shows are emptied, glyph ids and tables kept, fonts of form fields left whole; a subset that is not smaller is not writtenPdfImagePolicy.screen to re-encode a stored JPEG at its quality even when the image is not downsampled (recompressJpeg: true); ebook and print still keep stored JPEGsverifySignatures to check each signature's digest and signer key, where it returned false for every document; PdfSignatureInfo has isValid, coversWholeDocument and signingTime filledregisterFallbackFont so a second registration of a kind replaces the first and reaches only the Pdf that made it, where the font was shared by every instance of the processreduceImages, convertToPdfA, image bounds changes and saves within one page or operator, and to reach merge, split, compress, rendering, bookmarkRanges, classifyPages and the opening of a damaged file, where each ran to its end; on the web this needs a cross-origin isolated pagecancel() when the operation finished before the cancel landed: the task resolves with its result, so a finished edit is not reported as cancelled; an open or edit that finished is closed and reports PdfCancelledPdf instances to lease their web workers and native threads from one shared pool, so creating and disposing instances in a loop reuses them instead of starting a new one each timeconvertFromOffice and convertToOffice to bound hostile .doc, .xls, .ppt and ZIP input, to keep what a cut-off .docx, .pptx or .xlsx holds before the damage, and to write DOCX tables with no widths that Word no longer collapses (office_oxide 0.1.16)build: size, build: debug, a trimmed keep:) to 1.93 or newer, since the engine's per-thread memory count needs it on Android; the build says so and names the rustup commandrender now adds 2.4 MB where it added 4.8 MB, and office adds 5.4 MB where it added 2.9 MBkeepPages, split and removePages writing the pages they drop into the output, so the output kept its original size and the dropped pages' text, images and form values — a save now writes nothing only a dropped page reaches, and drops the links, bookmark targets and form fields that pointed at one (#261 reported by @crurui)sign dropping the document's bookmarks, form fields, page labels and every other catalog entry, and replacing an earlier signature — the signature now appends to the existing form and page (#263)sign writing a cross-reference table that other readers had to repair — each entry is now 20 bytesPdfSignatureInfo showing a non-ASCII signer name, reason or location as garbled text — UTF-16 text strings are decodedPdfEncryptionInfo.permissions reporting the wrong flags (a print-allowed file read as canPrint: false) — the engine's /P word is read at its spec bit positionsmarkRedaction without applyRedactions drawing a black box over text it never removed, so the file looked redacted and the text could still be copied — an unapplied redaction is saved as a redaction mark (a /Redact annotation) and the page content is left as it wasapplyRedactions leaving the pixels of images under a redacted area in the file — a covered image is removed, a partly covered one is copied with the covered pixels filled (only the 8×8 blocks under the area for a JPEG), masks included, and other pages keep the originalapplyRedactions leaving drawings, clip shapes, gradient meshes and form content under a redacted area in the file — they are removed or cut at the area's edge, and a form other pages show is copied for the redacted page onlyapplyRedactions leaving traces of the removed text in the file: font widths, Unicode mappings, Type 3 glyph procedures (a flattened field's font included) and alt text, in the structure tree or inside page content — entries only the removed text used are clearedapplyRedactions dropping every annotation on a redacted page — only the annotations under a redacted area go, with their form fieldsapplyRedactions refused on a later page leaving the earlier pages redacted while the call reported the error — it redacts every page or nonereduceImages leaving the images it had already re-encoded staged, so a later save wrote half the reduction — it stages nothing unless every image is doneconvertToPdfA leaving the editor half converted, or converted while the call reported the error — the editor is as it was before the callkeepPages, split, removePages or a reorder — each kept page keeps its labelPdfPageInfo.label always being null — it now holds the page's label when the document has page labelsmerge or any other multi-source op shifting every source after it, so the op read the wrong documents — an empty input now throws PdfCorruptedcompress and every other full-rewrite save dropping the document's title, author, dates and file identifier unless the title was edited — the saved file keeps the source's /Info and /ID, and an edited title replaces the old /Info instead of leaving it behindcompress and every other rewriting save could not be compared or cached by hash — objects are written in id order, so only the random AES IVs of an encrypted save differ/Size writing new objects over existing ones, and dropping an object it could not read without a word — it now throws PdfCorruptedrotatePages and other per-page edits slowing down with the square of the page count on large documentsflattenForms() and flattenAnnotations() of every page leaving pages unflattened after a page was deleted or moved, addImageStamp stamping the page the index named before the deletion, and a second image stamp on a page replacing the firstPdfPageBuilder.radioGroup always failing with "unknown pageOp"formFields misreading a field whose type, flags or value live on an ancestor field (a radio group read as a checkbox), and reporting a nameless parent as a field with an empty nameimage() with bytes that are not an image succeeding and drawing nothing — it throws PdfEngineFailedPdfPageOutOfRange with the page and the page countPdfCorrupted — it now throws PdfIoFailed, so a broken source is told from a broken filePdfIoFailedrender and extractImages returning an empty stream when the engine failed, a page past the end included — they throw the engine's errorrender ignoring line width, caps, joins, miter limit and dashes set through a graphics state resource (gs), which drew such lines 1 pt wide and solidrender drawing outlined text (text rendering modes 1, 2, 5 and 6) filled in the fill colour — the glyph outline is stroked in the stroke colour and line stylerender drawing strokes and text painted with a tiling pattern in a flat colour — the pattern now shows inside the stroke or the glyphsrender coming out smaller than asked on pages with a crop boxopen or edit keeping its source channel until the instance was disposedcancel() on a job still waiting behind another one waiting for that job to end — it resolves at once; on JSPI a cancel during a sink write no longer waits for the writePdf fail — the next operation starts a worker againbuilder.save, editor.save and extractAttachment succeeding in web OPFS mode when the sink threw, and a slow sink piling chunks up in memory — the worker now spools output to disk and the sink is awaited chunk by chunk, so its error fails the opPdf that was never disposed keeping its workers, lanes and registered fonts for good — they are released when it is garbage collected, with a debug warning( or < unescaped, so the name ended early and the rest of its dictionary was misread — delimiters are written as #XXdependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v6.0.0-dev.0dependencies:
pdf_manipulator: ^6.0.0-dev.0Engine updated — web: re-run flutter pub run pdf_manipulator:setup --force web (native updates itself)
flutter pub run pdf_manipulator:setup --force web (native updates itself)keep: list without extract, such as keep: [], failing to compile the engine with cannot find search in crate — the search module now compiles in every keep-set (#256 reported by @DarkWingMcQuack)compiled without 'legacy-crypto' — the web engine now carries the same legacy encryption and ICC colour support as native (#257 reported by @crurui)dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v5.0.1dependencies:
pdf_manipulator: ^5.0.1Engine updated — web: re-run flutter pub run pdf_manipulator:setup --force web (native updates itself)
flutter pub run pdf_manipulator:setup --force web (native updates itself)keep: list without extract, such as keep: [], failing to compile the engine with cannot find search in crate — the search module now compiles in every keep-set (#256 reported by @DarkWingMcQuack)compiled without 'legacy-crypto' — the web engine now carries the same legacy encryption and ICC colour support as native (#257 reported by @crurui)dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v5.0.1-dev.0dependencies:
pdf_manipulator: ^5.0.1-dev.0Breaking: PdfEditor.optimizeImages(quality:, minSize:) is removed → use reduceImages(PdfImagePolicy(jpegQuality: quality, minPixels: minSize, convertC
PdfEditor.optimizeImages(quality:, minSize:) is removed → use reduceImages(PdfImagePolicy(jpegQuality: quality, minPixels: minSize, convertCmykToRgb: true)); the count it returned is report.changedcompress(imageQuality:) → compress(images:), a PdfImagePolicy defaulting to PdfImagePolicy.ebook (150 ppi, JPEG quality 75), so a plain compress now downsamples images drawn above 225 ppi; pass PdfImagePolicy(jpegQuality: q) for the old behaviourget prefix): getTitle() → title, getAuthor() → author, getSubject() → subject, getKeywords() → keywords, getProducer() → producer, getCreationDate() → creationDate, and on PdfDoc getSignatures() → signatures; the one read with an argument is a noun method, getPageMediaBox(page) → pageMediaBox(page)flattenAllAnnotations() is flattenAnnotations({int? page}), and flattenForms() gains the same optional page; without it both flatten every page as beforeapplyRedactions() now returns a PdfRedactionReport (regions, glyphs removed, images modified or removed, paths pruned) instead of void; awaiting it still applies the redactionsmergeFrom(other) gains pages: (a 0-based list; null merges every page) and embedFile(name, data) gains description:, mimeType: and relationship:; positional callers are unchangedflutter pub run pdf_manipulator:setup --force web (native updates itself)PdfEditor.pageImages(page) — every image XObject drawn on a page with its resource name, bounds and transform; the name is what resizeImage takesPdfEditor.repositionImage(page, name, x:, y:) and setImageBounds(page, name, bounds) — move, or move and resize, an image by the name pageImages listsPdfEditor.reduceImages(PdfImagePolicy) — downsamples images to the resolution they are drawn at and re-encodes them by kind (JPEG, predicted Flate, CCITT G4), soft masks included, presets screen/ebook/print/lossless, one PdfImageReport row per image with the reason when it is kept; images reached only through annotation appearances, patterns or inline BI … EI stay as storedcompress(images: PdfImagePolicy.screen) — the one-shot takes the same policyPdfImagePolicy.minSavings (default 10%: a lossy re-encode must earn its bytes or the image is kept), chromaSubsampling (auto = 4:4:4 from quality 90, full, half; print pins full) and recompressJpeg (re-encode stored JPEGs at jpegQuality even when not downsampled; off by default)PdfEditor.pageCropBox(page) (null when the page has no CropBox), setPageMediaBox, setPageCropBox and setPageRotation(page, degrees:) (absolute, where rotatePage is relative)PdfEditor.clearEraseRegions(page) to drop the regions queued by eraseRegions before savePdfEditor.sanitize(PdfSanitizeOptions) — strip metadata, JavaScript actions and embedded files in one pass; scrubMetadata() is its metadata-only formPdfDoc.formFields and formField(name) — every AcroForm field with its type, typed value, tooltip, bounds, max length, alignment and read-only/required flagsPdfEditor: removeFormField, setFormFieldReadOnly, setFormFieldRequired, setFormFieldTooltip, setFormFieldBounds, setFormFieldMaxLength, setFormFieldAlignment, setFormFieldBackgroundColor, setFormFieldBorderColor, setFormFieldBorderWidth, setFormFieldAppearance and setFormFieldFlags — each read back after save by formFieldsPdfDoc.exportFormData(sink, format:) — the filled values as FDF or XFDFPdfDoc.xfa (PdfXfaInfo with field count, page count and field types, or null without an XFA packet) and the one-shot convertXfaToAcroForm(source, output) that rewrites an XFA form as a plain AcroFormPdfDoc.attachments (name, size, description, MIME type, read from the name tree without decoding the files) and extractAttachment(name, sink)pageImages listing Form XObjects — only /Subtype /Image resources are listed, so every name is a valid resizeImage targetw:tblGrid widths, scaled to the printable width (#243 reported by @kampmapa1-design)WASM init failed: Out of memory during rapid create-and-dispose churn — a worker slot is freed when the browser confirms the worker is gone, not at terminate()pageMediaBox returning the box's far corner as its width and height whenever the MediaBox origin is not (0, 0)eraseRegions and addRedaction acting on the wrong rectangle — the width and height were passed where the far corner was expected, so every region past the origin was off by its own sizeaddStamp losing the stamp on save when its rectangle sits high on the page — the same size-for-corner mix-up placed the label above the page edge; the builder's image was drawn at the wrong size for the same reasonmergeFrom dropping the merged document's form fields — the pages arrived but no /Fields entry pointed at them, so they could not be listed or filled; the AcroForm is carried across nowtext#232Fplain — the solidus was escaped twice.doc fixes)dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v5.0.0dependencies:
pdf_manipulator: ^5.0.0Breaking: PdfEditor.optimizeImages(quality:, minSize:) is removed → use reduceImages(PdfImagePolicy(jpegQuality: quality, minPixels: minSize, convertC
PdfEditor.optimizeImages(quality:, minSize:) is removed → use reduceImages(PdfImagePolicy(jpegQuality: quality, minPixels: minSize, convertCmykToRgb: true)); the count it returned is report.changedcompress(imageQuality:) → compress(images:), a PdfImagePolicy defaulting to PdfImagePolicy.ebook (150 ppi, JPEG quality 75), so a plain compress now downsamples images drawn above 225 ppi; pass PdfImagePolicy(jpegQuality: q) for the old behaviourget prefix): getTitle() → title, getAuthor() → author, getSubject() → subject, getKeywords() → keywords, getProducer() → producer, getCreationDate() → creationDate, and on PdfDoc getSignatures() → signatures; the one read with an argument is a noun method, getPageMediaBox(page) → pageMediaBox(page)flattenAllAnnotations() is flattenAnnotations({int? page}), and flattenForms() gains the same optional page; without it both flatten every page as beforeapplyRedactions() now returns a PdfRedactionReport (regions, glyphs removed, images modified or removed, paths pruned) instead of void; awaiting it still applies the redactionsmergeFrom(other) gains pages: (a 0-based list; null merges every page) and embedFile(name, data) gains description:, mimeType: and relationship:; positional callers are unchangedflutter pub run pdf_manipulator:setup --force web (native updates itself)PdfEditor.pageImages(page) — every image XObject drawn on a page with its resource name, bounds and transform; the name is what resizeImage takesPdfEditor.repositionImage(page, name, x:, y:) and setImageBounds(page, name, bounds) — move, or move and resize, an image by the name pageImages listsPdfEditor.reduceImages(PdfImagePolicy) — downsamples images to the resolution they are drawn at and re-encodes them by kind (JPEG, predicted Flate, CCITT G4), soft masks included, presets screen/ebook/print/lossless, one PdfImageReport row per image with the reason when it is kept; images reached only through annotation appearances, patterns or inline BI … EI stay as storedcompress(images: PdfImagePolicy.screen) — the one-shot takes the same policyPdfImagePolicy.minSavings (default 10%: a lossy re-encode must earn its bytes or the image is kept), chromaSubsampling (auto = 4:4:4 from quality 90, full, half; print pins full) and recompressJpeg (re-encode stored JPEGs at jpegQuality even when not downsampled; off by default)PdfEditor.pageCropBox(page) (null when the page has no CropBox), setPageMediaBox, setPageCropBox and setPageRotation(page, degrees:) (absolute, where rotatePage is relative)PdfEditor.clearEraseRegions(page) to drop the regions queued by eraseRegions before savePdfEditor.sanitize(PdfSanitizeOptions) — strip metadata, JavaScript actions and embedded files in one pass; scrubMetadata() is its metadata-only formPdfDoc.formFields and formField(name) — every AcroForm field with its type, typed value, tooltip, bounds, max length, alignment and read-only/required flagsPdfEditor: removeFormField, setFormFieldReadOnly, setFormFieldRequired, setFormFieldTooltip, setFormFieldBounds, setFormFieldMaxLength, setFormFieldAlignment, setFormFieldBackgroundColor, setFormFieldBorderColor, setFormFieldBorderWidth, setFormFieldAppearance and setFormFieldFlags — each read back after save by formFieldsPdfDoc.exportFormData(sink, format:) — the filled values as FDF or XFDFPdfDoc.xfa (PdfXfaInfo with field count, page count and field types, or null without an XFA packet) and the one-shot convertXfaToAcroForm(source, output) that rewrites an XFA form as a plain AcroFormPdfDoc.attachments (name, size, description, MIME type, read from the name tree without decoding the files) and extractAttachment(name, sink)pageImages listing Form XObjects — only /Subtype /Image resources are listed, so every name is a valid resizeImage targetdependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v5.0.0-dev.0dependencies:
pdf_manipulator: ^5.0.0-dev.0Engine updated — web: re-run flutter pub run pdf_manipulator:setup --force web (native updates itself)
flutter pub run pdf_manipulator:setup --force web (native updates itself)w:tblGrid, so no edit to w:tblW, w:gridCol or w:tcW could change the layout. Declared widths now drive the columns, scaled down proportionally when they exceed the printable width; content sampling remains only for tables that declare no widths, and can no longer size a table past the page edge (#243 reported by @kampmapa1-design)WASM init failed: Out of memory during rapid create-and-dispose churn. The page-wide worker budget freed a slot the moment worker.terminate() was called, but the browser releases a worker's WASM memory later, on its own schedule, so a burst of disposes let new workers boot into memory that dead ones still held. Every worker now holds a liveness lock for its lifetime in all three I/O modes (OPFS reclaim already used it), and a slot returns only when the browser confirms the worker is gone — the next boot past the cap waits its turn, as the native lane budget already did/Perms fix rides on top) and office_oxide v0.1.3 → v0.1.11 (write-path correctness fixes, legacy .doc tables and lists)dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v4.2.1-dev.0dependencies:
pdf_manipulator: ^4.2.1-dev.0Engine updated — web: re-run flutter pub run pdf_manipulator:setup --force web (native updates itself)
flutter pub run pdf_manipulator:setup --force web (native updates itself)setCheckboxFieldValue(fieldName, checked) for a checkbox whose on-state name you do not know. A checkbox is on when its value names one of the states in its /AP /N dictionary, and that name is a convention rather than a rule — /Yes is the common one, /On and /1 are not rare. Passing true picks whichever name that widget offers. setFormFieldValue still takes the name directly when you do know it.setFormFieldValue passed every value through as text, so a checkbox kept the unchecked state it was parsed with and flattenForms baked that empty appearance into the page. /V and /AS were written as text strings too, which name no appearance state, so the value was also lost when the file was opened again. A button's value is now read as a state name, resolved against the states that widget actually offers, and written as a name; flattening draws the state that was set, using the widget's own artwork where the document supplies it (#215 reported by @DarkWingMcQuack)/AS was written to the parent field, but a radio group's appearance states live on its kid widgets, so nothing changed on the page. The two button flags were also swapped when reading a widget — ISO 32000-1 puts Radio at bit position 16 and Pushbutton at 17 — so a spec-conformant radio group was read as a push button, which has no state to track. Setting a group's value now turns on the kid that offers that state and clears its siblingsdependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v4.2.0dependencies:
pdf_manipulator: ^4.2.0flutter pub run pdf_manipulator:setup --force web (native updates itself)setCheckboxFieldValue(fieldName, checked) — checks a checkbox without knowing its on-state name (/Yes, /On, /1 …); setFormFieldValue still takes the name directlyEngine updated — web: re-run flutter pub run pdf_manipulator:setup --force web (native updates itself)
flutter pub run pdf_manipulator:setup --force web (native updates itself)setCheckboxFieldValue(fieldName, checked) for a checkbox whose on-state name you do not know. A checkbox is on when its value names one of the states in its /AP /N dictionary, and that name is a convention rather than a rule — /Yes is the common one, /On and /1 are not rare. Passing true picks whichever name that widget offers. setFormFieldValue still takes the name directly when you do know it.setFormFieldValue passed every value through as text, so a checkbox kept the unchecked state it was parsed with and flattenForms baked that empty appearance into the page. /V and /AS were written as text strings too, which name no appearance state, so the value was also lost when the file was opened again. A button's value is now read as a state name, resolved against the states that widget actually offers, and written as a name; flattening draws the state that was set, using the widget's own artwork where the document supplies it (#215 reported by @DarkWingMcQuack)/AS was written to the parent field, but a radio group's appearance states live on its kid widgets, so nothing changed on the page. The two button flags were also swapped when reading a widget — ISO 32000-1 puts Radio at bit position 16 and Pushbutton at 17 — so a spec-conformant radio group was read as a push button, which has no state to track. Setting a group's value now turns on the kid that offers that state and clears its siblingsdependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v4.2.0-dev.0dependencies:
pdf_manipulator: ^4.2.0-dev.0Added scan-dirs : extra directories for keep: auto to scan, on top of your app's lib/ and bin/ . Code living somewhere else — a tools/ folder, a sibli
scan-dirs: extra directories for keep: auto to scan, on top of your app's lib/ and bin/. Code living somewhere else — a tools/ folder, a sibling package in a monorepo — was invisible to the scan, so a capability you really call could be trimmed away. Now you point at it: scan-dirs: [tools, packages/shared/lib], paths relative to your app. It only applies where there is a scan to widen (keep: auto, and not detector: record-use), and a directory that isn't there keeps the full binary rather than quietly scanning less than you asked for.keep: auto now actually trims the native engine, so a build that had been silently shipping every capability gets a smaller one. If anything is missing, state it yourself with keep: [render, …].setup ignoring your config when run from a subfolder of your project. It read the config and scanned for source relative to wherever you were standing, so from anywhere but the app root it found no pubspec, silently read that as "nothing configured", and shipped the full web engine. Both lanes now locate your app the same way — from a path inside its own .dart_tool/, which neither the working directory nor where you invoke the command can move.keep: auto keeping every capability on native no matter what your app used. The build hook read its own working directory as your app's source, but hooks are started inside the package they belong to — so the scan matched pdf_manipulator's own implementations and concluded you used all of them, every time, while reporting success. It now derives your app from the hook's output path. Web was never affected: you run setup from your own project, so its scan was always looking in the right place.sign() call to an app that had already been built and the engine kept compiling without signature support. The source the scan reads is now a hook dependency, so the decision re-evaluates when your app changes.dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v4.1.0dependencies:
pdf_manipulator: ^4.1.0keep: auto now actually trims the native engine; if something is missing, state it with keep: [render, …]scan-dirs — extra directories for keep: auto to scan beyond lib/ and bin/ (scan-dirs: [tools, packages/shared/lib], relative to your app); a directory that is not there keeps the full binary rather than scanning lesssetup ignoring your config when run from a subfolder of your project — both lanes now locate your app from its own .dart_tool/, not from the working directorykeep: auto keeping every capability on native — the build hook scanned its own package instead of your app; it now derives your app from the hook's output path (web was never affected)sign() call recompiles the engine with signaturesAdded scan-dirs : extra directories for keep: auto to scan, on top of your app's lib/ and bin/ . Code living somewhere else — a tools/ folder, a sibli
scan-dirs: extra directories for keep: auto to scan, on top of your app's lib/ and bin/. Code living somewhere else — a tools/ folder, a sibling package in a monorepo — was invisible to the scan, so a capability you really call could be trimmed away. Now you point at it: scan-dirs: [tools, packages/shared/lib], paths relative to your app. It only applies where there is a scan to widen (keep: auto, and not detector: record-use), and a directory that isn't there keeps the full binary rather than quietly scanning less than you asked for.keep: auto now actually trims the native engine, so a build that had been silently shipping every capability gets a smaller one. If anything is missing, state it yourself with keep: [render, …].setup ignoring your config when run from a subfolder of your project. It read the config and scanned for source relative to wherever you were standing, so from anywhere but the app root it found no pubspec, silently read that as "nothing configured", and shipped the full web engine. Both lanes now locate your app the same way — from a path inside its own .dart_tool/, which neither the working directory nor where you invoke the command can move.keep: auto keeping every capability on native no matter what your app used. The build hook read its own working directory as your app's source, but hooks are started inside the package they belong to — so the scan matched pdf_manipulator's own implementations and concluded you used all of them, every time, while reporting success. It now derives your app from the hook's output path. Web was never affected: you run setup from your own project, so its scan was always looking in the right place.sign() call to an app that had already been built and the engine kept compiling without signature support. The source the scan reads is now a hook dependency, so the decision re-evaluates when your app changes.dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v4.1.0-dev.0dependencies:
pdf_manipulator: ^4.1.0-dev.0Breaking: the engine is configured with three flat keys under hooks: user_defines: pdf_manipulator: — keep (which capabilities compile: auto to scan y
hooks: user_defines: pdf_manipulator: — keep (which capabilities compile: auto to scan your source, [render, …] for an exact set, or omit for everything), detector (how auto detects, only valid with keep: auto), and build (how they compile). Migrating from 3.x: trim: auto → keep: auto, trim: {keep: [render, …]} → keep: [render, …], trim-detector: X → detector: X, and the web-only setup --trim flag is gone — put your choice in pubspec and re-run flutter pub run pdf_manipulator:setup (web now reads the same block native does). Invalid configs fail the build loudly, never silently: an unknown key, a bad value, or a detector set without keep: auto all stop with a clear message (PR #185)build: in that same block — pick HOW the engine compiles: speed (default, prebuilt), size (smaller binary, opt-level z, a little slower), or debug (keeps symbols so a native engine crash points to a file and line). size and debug compile from source and need Rust; works for web and native (PR #185)failed to load manifest ... feature edition2024 is required cargo error when the engine compiles from source (iOS device builds, git dependencies, or any download-miss) on an older Rust toolchain — the build now checks the required Rust version first and stops with a clear message naming the exact version and the rustup command to install it (#183 reported by @mrhazelh, PR #185)dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v4.0.0dependencies:
pdf_manipulator: ^4.0.0Migrating from 3.0.0: the migration guide has the before and after code for every breaking change below.
hooks: user_defines: pdf_manipulator: — keep (auto, [render, …], or omit for everything), detector (only with keep: auto) and build. Migrate: trim: auto → keep: auto, trim: {keep: […]} → keep: […], trim-detector: X → detector: X, drop setup --trim and re-run flutter pub run pdf_manipulator:setup; an invalid config fails the build with a clear messagebuild: in the same block — speed (default, prebuilt), size (smaller, opt-level z) or debug (symbols for native crash traces); size and debug compile from source and need Rustfeature edition2024 is required cargo error on older Rust toolchains — the build checks the required Rust version first and names the rustup command to run (#183 reported by @mrhazelh)Breaking: the engine is configured with three flat keys under hooks: user_defines: pdf_manipulator: — keep (which capabilities compile: auto to scan y
hooks: user_defines: pdf_manipulator: — keep (which capabilities compile: auto to scan your source, [render, …] for an exact set, or omit for everything), detector (how auto detects, only valid with keep: auto), and build (how they compile). Migrating from 3.x: trim: auto → keep: auto, trim: {keep: [render, …]} → keep: [render, …], trim-detector: X → detector: X, and the web-only setup --trim flag is gone — put your choice in pubspec and re-run flutter pub run pdf_manipulator:setup (web now reads the same block native does). Invalid configs fail the build loudly, never silently: an unknown key, a bad value, or a detector set without keep: auto all stop with a clear message (PR #185)build: in that same block — pick HOW the engine compiles: speed (default, prebuilt), size (smaller binary, opt-level z, a little slower), or debug (keeps symbols so a native engine crash points to a file and line). size and debug compile from source and need Rust; works for web and native (PR #185)failed to load manifest ... feature edition2024 is required cargo error when the engine compiles from source (iOS device builds, git dependencies, or any download-miss) on an older Rust toolchain — the build now checks the required Rust version first and stops with a clear message naming the exact version and the rustup command to install it (#183 reported by @mrhazelh, PR #185)dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v4.0.0-dev.0dependencies:
pdf_manipulator: ^4.0.0-dev.0Breaking: flattening CJK or emoji form values no longer uses a bundled font (it added 4.4 MB to every install). Register one once: await pdf.registerF
await pdf.registerFallbackFont(PdfFallbackFontKind.cjk, fontBytes) (.emoji for emoji). Without one the value is still saved correctly — only the baked-in look falls back to the field's own font.trim-detector value analyzer is now scan → change it or delete the line — it is the default (PR #172)flutter pub run pdf_manipulator:setup --force web (native updates itself)trim: auto under hooks: user_defines: pdf_manipulator: in your app pubspec, or choose yourself with trim: {keep: [render, signatures]}; on web also run flutter pub run pdf_manipulator:setup --trim. Needs Rust — the engine compiles once on your machine and is cached. Wrong or missing pieces fail with a clear message, never a broken app.Pdf.registerFallbackFont(PdfFallbackFontKind, Uint8List).Cargo.lock — wasm-bindgen-cli, binaryen, and jq are no longer needed, Rust is the only requirement on every platform, and the exact-version rejection is gone with the tools (#177 reported by @DarkWingMcQuack, PR #178)analyzer version onto your app, which blocked current freezed / json_serializable and friends. The analyzer dependency is gone: trim: auto uses a dependency-free source scan. It can only keep slightly more than you use, never less — state trim: {keep: [...]} yourself for the exact minimum (#171 reported by @DarkWingMcQuack, PR #172)Cargo.lock), which broke trim and every compile-from-source path with "No such file or directory" (#171 reported by @DarkWingMcQuack, PR #172)wasm-pack — it is not used. The build now points at the tool it actually misses, with the exact install command (PR #172)trim: auto counting member names inside comments as usage — a doc line saying "render them" kept the render capability. The scan now ignores comments, and prints where each kept member was matched, e.g. render (lib/preview.dart:12) (#175 reported by @DarkWingMcQuack, PR #178)dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v3.0.0dependencies:
pdf_manipulator: ^3.0.0Migrating from 2.1.4: the migration guide has the before and after code for every breaking change below.
flutter pub run pdf_manipulator:setup --force web (native updates itself)await pdf.registerFallbackFont(PdfFallbackFontKind.cjk, fontBytes) (.emoji for emoji); without one the value is still saved, only the baked-in look falls back to the field's fonttrim-detector: analyzer is now scan → change it or delete the line, it is the defaulttrim: auto under hooks: user_defines: pdf_manipulator:, or trim: {keep: [render, signatures]}; on web also run flutter pub run pdf_manipulator:setup --trim; needs Rust, compiled once and cached (#167)Pdf.registerFallbackFont(PdfFallbackFontKind, Uint8List)wasm-bindgen-cli, binaryen and jq are no longer needed, Rust is the only requirement (#177 reported by @DarkWingMcQuack)analyzer version onto your app — the dependency is gone; trim: auto uses a dependency-free scan that can only keep slightly more than you use, never less (#171 reported by @DarkWingMcQuack)Cargo.lock, which broke trim and every compile-from-source path (#171 reported by @DarkWingMcQuack)wasm-pack — it now names the tool it actually misses, with the install commandtrim: auto counting member names inside comments as usage — the scan ignores comments and prints where each kept member matched, e.g. render (lib/preview.dart:12) (#175 reported by @DarkWingMcQuack)Engine updated — web: re-run flutter pub run pdf_manipulator:setup --force web (native updates itself)
flutter pub run pdf_manipulator:setup --force web (native updates itself)Cargo.lock — wasm-bindgen-cli, binaryen, and jq are no longer needed, Rust is the only requirement on every platform, and the exact-version rejection is gone with the tools (#177 reported by @DarkWingMcQuack, PR #178)trim: auto counting member names inside comments as usage — a doc line saying "render them" kept the render capability. The scan now ignores comments, and prints where each kept member was matched, e.g. render (lib/preview.dart:12) (#175 reported by @DarkWingMcQuack, PR #178)dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v3.0.0-dev.1dependencies:
pdf_manipulator: ^3.0.0-dev.1Breaking: flattening CJK or emoji form values no longer uses a bundled font (it added 4.4 MB to every install). Register one once: await pdf.registerF
await pdf.registerFallbackFont(PdfFallbackFontKind.cjk, fontBytes) (.emoji for emoji). Without one the value is still saved correctly — only the baked-in look falls back to the field's own font.trim-detector value analyzer is now scan → change it or delete the line — it is the default (PR #172)flutter pub run pdf_manipulator:setup --force web (native updates itself)trim: auto under hooks: user_defines: pdf_manipulator: in your app pubspec, or choose yourself with trim: {keep: [render, signatures]}; on web also run flutter pub run pdf_manipulator:setup --trim. Needs Rust — the engine compiles once on your machine and is cached. Wrong or missing pieces fail with a clear message, never a broken app.Pdf.registerFallbackFont(PdfFallbackFontKind, Uint8List).analyzer version onto your app, which blocked current freezed / json_serializable and friends. The analyzer dependency is gone: trim: auto uses a dependency-free source scan. It can only keep slightly more than you use, never less — state trim: {keep: [...]} yourself for the exact minimum (#171 reported by @DarkWingMcQuack, PR #172)Cargo.lock), which broke trim and every compile-from-source path with "No such file or directory" (#171 reported by @DarkWingMcQuack, PR #172)wasm-pack — it is not used. The build now points at the tool it actually misses, with the exact install command (PR #172)dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v3.0.0-dev.0dependencies:
pdf_manipulator: ^3.0.0-dev.0Warning Retracted on pub.dev : the published archive was missing a build file (the engine's Cargo.lock ), breaking trim and compile-from-source instal
Warning
Retracted on pub.dev: the published archive was missing a build file (the engine's Cargo.lock), breaking trim and compile-from-source installs. Use 3.0.0, which consolidates everything here. Git-tag consumers (ref: v2.2.0) are unaffected — this tag and its binaries are complete.
await pdf.registerFallbackFont(PdfFallbackFontKind.cjk, fontBytes) (.emoji for emoji). Without one the value is still saved correctly — only the baked-in look falls back to the field's own font.flutter pub run pdf_manipulator:setup --force web (native updates itself)trim: auto under hooks: user_defines: pdf_manipulator: in your app pubspec, or choose yourself with trim: {keep: [render, signatures]}; on web also run flutter pub run pdf_manipulator:setup --trim. Needs Rust — the engine compiles once on your machine and is cached. Wrong or missing pieces fail with a clear message, never a broken app.Pdf.registerFallbackFont(PdfFallbackFontKind, Uint8List).dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v2.2.0dependencies:
pdf_manipulator: ^2.2.0Retracted on pub.dev: the published archive was missing a build file (the engine's
Cargo.lock), breakingtrimand compile-from-source installs. Superseded by 3.0.0, which consolidates everything here. Migrating from 2.1.4: the migration guide has the before and after code for this change, in its 3.0.0 section.
flutter pub run pdf_manipulator:setup --force web (native updates itself)await pdf.registerFallbackFont(PdfFallbackFontKind.cjk, fontBytes) (.emoji for emoji); without one the value is still saved, only the baked-in look falls back to the field's fonttrim: auto under hooks: user_defines: pdf_manipulator:, or trim: {keep: [render, signatures]}; on web also run flutter pub run pdf_manipulator:setup --trim; needs Rust, compiled once and cached (#167)Pdf.registerFallbackFont(PdfFallbackFontKind, Uint8List)Warning Retracted on pub.dev : the published archive was missing a build file (the engine's Cargo.lock ), breaking trim and compile-from-source instal
Warning
Retracted on pub.dev: the published archive was missing a build file (the engine's Cargo.lock), breaking trim and compile-from-source installs. Use 3.0.0, which consolidates everything here. Git-tag consumers (ref: v2.2.0) are unaffected — this tag and its binaries are complete.
await pdf.registerFallbackFont(PdfFallbackFontKind.cjk, fontBytes) (.emoji for emoji). Without one the value is still saved correctly — only the baked-in look falls back to the field's own font.flutter pub run pdf_manipulator:setup --force web (native updates itself)trim: auto under hooks: user_defines: pdf_manipulator: in your app pubspec, or choose yourself with trim: {keep: [render, signatures]}; on web also run flutter pub run pdf_manipulator:setup --trim. Needs Rust — the engine compiles once on your machine and is cached. Wrong or missing pieces fail with a clear message, never a broken app.Pdf.registerFallbackFont(PdfFallbackFontKind, Uint8List).dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v2.2.0-dev.0dependencies:
pdf_manipulator: ^2.2.0-dev.0Engine updated — web: re-run flutter pub run pdf_manipulator:setup --force web (native updates itself)
flutter pub run pdf_manipulator:setup --force web (native updates itself)flattenForms dropping a field's value when the fill and the flatten happen in separate editor sessions — a reopened editor carries no in-session modified-field map, so the flattener now regenerates the appearance from the persisted /V (saved alongside /NeedAppearances) instead of baking the stale placeholder (#161 reported by @DarkWingMcQuack, PR #162)addImageStamp erasing a page's existing form widgets when the page references its annotations through an indirect /Annots reference rather than a direct array (#161 reported by @DarkWingMcQuack, PR #162)/V when the AcroForm sets /NeedAppearances, matching the flattener (PR #162)dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v2.1.4dependencies:
pdf_manipulator: ^2.1.4flutter pub run pdf_manipulator:setup --force web (native updates itself)flattenForms dropping a field's value when fill and flatten happen in separate editor sessions — the appearance is regenerated from the persisted /V (#161 reported by @DarkWingMcQuack)addImageStamp erasing a page's form widgets when /Annots is an indirect reference (#161 reported by @DarkWingMcQuack)/V under /NeedAppearances, matching the flattenerEngine updated — web: re-run flutter pub run pdf_manipulator:setup --force web (native updates itself)
flutter pub run pdf_manipulator:setup --force web (native updates itself)flattenForms dropping a field's value when the fill and the flatten happen in separate editor sessions — a reopened editor carries no in-session modified-field map, so the flattener now regenerates the appearance from the persisted /V (saved alongside /NeedAppearances) instead of baking the stale placeholder (#161 reported by @DarkWingMcQuack, PR #162)addImageStamp erasing a page's existing form widgets when the page references its annotations through an indirect /Annots reference rather than a direct array (#161 reported by @DarkWingMcQuack, PR #162)/V when the AcroForm sets /NeedAppearances, matching the flattener (PR #162)<details><summary>Commits since v2.1.3-dev.0 (5)</summary>
</details>
dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v2.1.4-dev.0
dependencies:
pdf_manipulator: ^2.1.4-dev.0
Fixed setFormFieldValue reporting field-not-found on forms whose field names are stored as raw UTF-8 (LibreOffice-class producers) — one spec-tolerant
setFormFieldValue reporting field-not-found on forms whose field names are stored as raw UTF-8 (LibreOffice-class producers) — one spec-tolerant text-string decoder now handles UTF-16BE/LE, UTF-8 with and without BOM, and PDFDocEncoding across every read (#155, PR #156)flattenForms baking mojibake for values outside ASCII (ß → ß or �) — values decode per ISO 32000-1 §7.9.2.2 and appearance text is written one WinAnsi byte per character instead of UTF-8 (#155, PR #156)getTitle and friends) mangling non-ASCII on read, and metadata writes now encode per spec so other readers see the right text (#155, PR #156)<details><summary>Commits since v2.1.2 (6)</summary>
</details>
dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v2.1.3
dependencies:
pdf_manipulator: ^2.1.3
flutter pub run pdf_manipulator:setup --force web (native updates itself)setFormFieldValue reporting field-not-found on forms whose field names are raw UTF-8 (LibreOffice-class producers) — one spec-tolerant text-string decoder covers UTF-16, UTF-8 and PDFDocEncoding (#155)flattenForms baking mojibake for values outside ASCII (ß → ß) — values decode per ISO 32000-1 §7.9.2.2 and appearance text is written in WinAnsi (#155)getTitle and friends) mangling non-ASCII on read, and writes now encode per spec (#155)Fixed setFormFieldValue reporting field-not-found on forms whose field names are stored as raw UTF-8 (LibreOffice-class producers) — one spec-tolerant
setFormFieldValue reporting field-not-found on forms whose field names are stored as raw UTF-8 (LibreOffice-class producers) — one spec-tolerant text-string decoder now handles UTF-16BE/LE, UTF-8 with and without BOM, and PDFDocEncoding across every read (#155, PR #156)flattenForms baking mojibake for values outside ASCII (ß → ß or �) — values decode per ISO 32000-1 §7.9.2.2 and appearance text is written one WinAnsi byte per character instead of UTF-8 (#155, PR #156)getTitle and friends) mangling non-ASCII on read, and metadata writes now encode per spec so other readers see the right text (#155, PR #156)<details><summary>Commits since v2.1.2-dev.0 (8)</summary>
</details>
dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v2.1.3-dev.0
dependencies:
pdf_manipulator: ^2.1.3-dev.0
Fixed a Flutter Web WASM (dart2wasm) compile failure — the _post switch over Object? was non-exhaustive under dart2wasm (dart2js treats JSAny as a cat
dart2wasm) compile failure — the _post switch over Object? was non-exhaustive under dart2wasm (dart2js treats JSAny as a catch-all, dart2wasm doesn't), now converted with jsify() (#145 reported by @DarkWingMcQuack, PR #146)pana can analyze, so the package shows web (dart2js) support (PR #133)<details><summary>Commits since v2.1.1 (30)</summary>
@v1.0.1 (#136)</details>
dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v2.1.2
dependencies:
pdf_manipulator: ^2.1.2
flutter pub run pdf_manipulator:setup --force web (native updates itself)dart2wasm) compile failure — a switch over Object? that dart2js accepted was non-exhaustive under dart2wasm (#145 reported by @DarkWingMcQuack)pana can analyzeFixed a Flutter Web WASM (dart2wasm) compile failure — the _post switch over Object? was non-exhaustive under dart2wasm (dart2js treats JSAny as a cat
dart2wasm) compile failure — the _post switch over Object? was non-exhaustive under dart2wasm (dart2js treats JSAny as a catch-all, dart2wasm doesn't), now converted with jsify() (#145 reported by @DarkWingMcQuack, PR #146)pana can analyze, so the package shows web (dart2js) support (PR #133)<details><summary>Commits since v2.1.1-dev.0 (30)</summary>
@v1.0.1 (#136)</details>
dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v2.1.2-dev.0
dependencies:
pdf_manipulator: ^2.1.2-dev.0
Fixed the README banner not rendering on pub.dev — the element is flattened to a plain image in the published package (PR #111)
<picture> element is flattened to a plain image in the published package (PR #111)<details><summary>Commits since v2.1.0 (13)</summary>
</details>
dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v2.1.1
dependencies:
pdf_manipulator: ^2.1.1
Fixed the README banner not rendering on pub.dev — the element is flattened to a plain image in the published package (PR #111)
<picture> element is flattened to a plain image in the published package (PR #111)<details><summary>Commits since v2.1.0-dev.0 (14)</summary>
</details>
dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v2.1.1-dev.0
dependencies:
pdf_manipulator: ^2.1.1-dev.0
Added document producer and creation-date metadata — PdfEditor.setProducer() / getProducer() and setCreationDate() / getCreationDate() (raw PDF date s
PdfEditor.setProducer() / getProducer() and setCreationDate() / getCreationDate() (raw PDF date strings, e.g. D:20240101120000Z), plus PdfDoc.producer, PdfDoc.creator, and PdfDoc.creationDate read on openaddImageStamp rendering a transparent-background PNG as a solid black box — the alpha channel now ships as a grayscale /SMask and the PNG predictor params are preserved, so transparent areas reveal the page instead of painting black (#103 reported by @DarkWingMcQuack, PR #104)RenderedPage.data doc — render() returns PNG-encoded bytes (decode to read pixels), not raw RGBA (PR #104)<details><summary>Commits since v2.0.1 (10)</summary>
</details>
dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v2.1.0
dependencies:
pdf_manipulator: ^2.1.0
flutter pub run pdf_manipulator:setup --force web (native updates itself)PdfEditor.setProducer() / getProducer() and setCreationDate() / getCreationDate() (raw PDF date strings, e.g. D:20240101120000Z), plus PdfDoc.producer, PdfDoc.creator, and PdfDoc.creationDate read on openaddImageStamp rendering a transparent-background PNG as a solid black box — the alpha channel ships as a grayscale /SMask (#103 reported by @DarkWingMcQuack)RenderedPage.data doc — render() returns PNG-encoded bytes (decode to read pixels), not raw RGBAAdded document producer and creation-date metadata — PdfEditor.setProducer() / getProducer() and setCreationDate() / getCreationDate() (raw PDF date s
PdfEditor.setProducer() / getProducer() and setCreationDate() / getCreationDate() (raw PDF date strings, e.g. D:20240101120000Z), plus PdfDoc.producer, PdfDoc.creator, and PdfDoc.creationDate read on open<details><summary>Commits since v2.0.2-dev.0 (2)</summary>
</details>
dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v2.1.0-dev.0
dependencies:
pdf_manipulator: ^2.1.0-dev.0
Fixed addImageStamp rendering a transparent-background PNG as a solid black box — the alpha channel now ships as a grayscale /SMask and the PNG predic
addImageStamp rendering a transparent-background PNG as a solid black box — the alpha channel now ships as a grayscale /SMask and the PNG predictor params are preserved, so transparent areas reveal the page instead of painting black (#103 reported by @DarkWingMcQuack, PR #104)RenderedPage.data doc — render() returns PNG-encoded bytes (decode to read pixels), not raw RGBA (PR #104)<details><summary>Commits since v2.0.1-dev.0 (8)</summary>
</details>
dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v2.0.2-dev.0
dependencies:
pdf_manipulator: ^2.0.2-dev.0
Docs-only — no code or API changes.
Docs-only — no code or API changes.
<details><summary>Commits since v2.0.0 (5)</summary>
</details>
dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v2.0.1
dependencies:
pdf_manipulator: ^2.0.1
Docs-only — no code or API changes.
Docs-only — no code or API changes.
<details><summary>Commits since v2.0.0-dev.0 (3)</summary>
</details>
dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v2.0.1-dev.0
dependencies:
pdf_manipulator: ^2.0.1-dev.0
The concurrency rewrite. Every operation now runs fully isolated on its own *lane* — a dedicated Rust thread (native) or Web Worker (web).
The concurrency rewrite. Every operation now runs fully isolated on its own lane — a dedicated Rust thread (native) or Web Worker (web).
webCoordinatorUrl + webWorkerUrl → one webLaneWorkerUrllane_worker.js (was coordinator.js + worker.js)flutter pub run pdf_manipulator:setup --force web (native updates itself)PdfTask<T> — a Future plus cancel(); cancelling kills just that jobpdf.dispose() is instant — no joins, no timeouts, no leaks; in-flight ops resolve with PdfCancelledPdfConfig.maxLanes — concurrent lanes per instance (default: half the cores, min 2)<details><summary>Commits since v1.0.6 (8)</summary>
</details>
dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v2.0.0
dependencies:
pdf_manipulator: ^2.0.0
The concurrency rewrite. Every operation now runs fully isolated on its own lane — a dedicated Rust thread (native) or Web Worker (web). Migrating from 1.0.6: the migration guide has the before and after code for every breaking change below.
flutter pub run pdf_manipulator:setup --force web (native updates itself)webCoordinatorUrl + webWorkerUrl → one webLaneWorkerUrllane_worker.js (was coordinator.js + worker.js)PdfTask<T> — a Future plus cancel(); cancelling kills just that jobpdf.dispose() is instant — no joins, no timeouts, no leaks; in-flight ops resolve with PdfCancelledPdfConfig.maxLanes — concurrent lanes per instance (default: half the cores, min 2)The concurrency rewrite. Every operation now runs fully isolated on its own *lane* — a dedicated Rust thread (native) or Web Worker (web).
The concurrency rewrite. Every operation now runs fully isolated on its own lane — a dedicated Rust thread (native) or Web Worker (web).
webCoordinatorUrl + webWorkerUrl → one webLaneWorkerUrllane_worker.js (was coordinator.js + worker.js)flutter pub run pdf_manipulator:setup --force web (native updates itself)PdfTask<T> — a Future plus cancel(); cancelling kills just that jobpdf.dispose() is instant — no joins, no timeouts, no leaks; in-flight ops resolve with PdfCancelledPdfConfig.maxLanes — concurrent lanes per instance (default: half the cores, min 2)<details><summary>Commits since v1.0.6-dev.0 (11)</summary>
</details>
dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v2.0.0-dev.0
dependencies:
pdf_manipulator: ^2.0.0-dev.0
Fixed release build routing for consumer builds (PR #80, @Binary-Parse)
.cmd extension for Android cross-compilation (PR #81, @Binary-Parse)<details><summary>Commits since v1.0.5 (8)</summary>
</details>
dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v1.0.6
dependencies:
pdf_manipulator: ^1.0.6
.cmd extension for Android cross-compilation (by @Binary-Parse)Fixed release build routing for consumer builds (PR #80, @Binary-Parse)
.cmd extension for Android cross-compilation (PR #81, @Binary-Parse)<details><summary>Commits since v1.0.5-dev.0 (6)</summary>
</details>
dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v1.0.6-dev.0
dependencies:
pdf_manipulator: ^1.0.6-dev.0
Fixed README version not stamped on pub.dev
<details><summary>Commits since v1.0.4 (3)</summary>
</details>
dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v1.0.5
dependencies:
pdf_manipulator: ^1.0.5
Fixed README version not stamped on pub.dev
<details><summary>Commits since v1.0.4-dev.0 (4)</summary>
</details>
dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v1.0.5-dev.0
dependencies:
pdf_manipulator: ^1.0.5-dev.0
Web setup now verifies all assets against release hashes — detects stale files automatically
setup supports --force to re-download everything, --native to pre-fetch the native binary<details><summary>Commits since v1.0.3 (5)</summary>
</details>
dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v1.0.4
dependencies:
pdf_manipulator: ^1.0.4
Web setup now verifies all assets against release hashes — detects stale files automatically
setup supports --force to re-download everything, --native to pre-fetch the native binary<details><summary>Commits since v1.0.3-dev.0 (5)</summary>
</details>
dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v1.0.4-dev.0
dependencies:
pdf_manipulator: ^1.0.4-dev.0
9b228dc chore: promote dev to prod
<details><summary>Commits since v1.0.2 (9)</summary>
</details>
dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v1.0.3
dependencies:
pdf_manipulator: ^1.0.3
3e0ebd8 chore: add 1.0.3 changelog entries
<details><summary>Commits since v1.0.2-dev.0 (6)</summary>
</details>
dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v1.0.3-dev.0
dependencies:
pdf_manipulator: ^1.0.3-dev.0
Fixed changelog on pub.dev missing commit history between versions
<details><summary>Commits since v1.0.1 (9)</summary>
</details>
dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v1.0.2
dependencies:
pdf_manipulator: ^1.0.2
Fixed changelog on pub.dev missing commit history between versions
<details><summary>Commits since v1.0.1-dev.0 (10)</summary>
</details>
dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v1.0.2-dev.0
dependencies:
pdf_manipulator: ^1.0.2-dev.0
Added public API doc comments across all exported classes and methods
flutter pub run pdf_manipulator:setup (avoids triggering native build hooks with dart run)<details><summary>Commits since v1.0.0 (48)</summary>
</details>
dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v1.0.1
dependencies:
pdf_manipulator: ^1.0.1
Added public API doc comments across all exported classes and methods
flutter pub run pdf_manipulator:setup (avoids triggering native build hooks with dart run)<details><summary>Commits since v1.0.0-dev.0 (17)</summary>
</details>
dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v1.0.1-dev.0
dependencies:
pdf_manipulator: ^1.0.1-dev.0
Complete ground-up rewrite. New engine, new API, every platform. See the migration guide for upgrading from the old Android-only version.
Complete ground-up rewrite. New engine, new API, every platform. See the migration guide for upgrading from the old Android-only version.
Pdf() with dispose(). Batch editing via pdf.edit(source). Create from scratch via pdf.build()DataSource in, DataSink out — no file paths, no dart:io. Same code on every platform. Engine reads only what it needs, never the full filePdfError sealed class — no more PlatformException<details><summary>Commits since v1.0.0-dev.0 (2)</summary>
</details>
dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v1.0.0
dependencies:
pdf_manipulator: ^1.0.0
Complete ground-up rewrite — new Rust engine, new instance API, cross-platform (previously Android only). The package docs carry the migration guide and the full capability list. Migrating from the Android-only 0.x plugin: the migration guide takes you straight to the current API, with the before and after code for every call.
Pdf() with dispose(); batch editing via pdf.edit(source), create from scratch via pdf.build()DataSource in, DataSink out — no file paths, no dart:io, same code on every targetPdfError sealed class — no more PlatformExceptionComplete ground-up rewrite. New engine, new API, every platform. See the migration guide for upgrading from the old Android-only version.
Complete ground-up rewrite. New engine, new API, every platform. See the migration guide for upgrading from the old Android-only version.
Pdf() with dispose(). Batch editing via pdf.edit(source). Create from scratch via pdf.build()DataSource in, DataSink out — no file paths, no dart:io. Same code on every platform. Engine reads only what it needs, never the full filePdfError sealed class — no more PlatformException<details><summary>Commits since initial (104)</summary>
pdfCompressor with unEmbedFonts set true for some pdfs.pdfDecryption finishes with error on BadPasswordException and PdfException.imagesToPdfs method not working for absolute file paths of files with names containing :.imagesToPdfs method not working for android absolute file paths.imagesToPdfs method not working for android uris. * Fixed imagesToPdfs adding unnecessary padding to pdfs when createSinglePdf is set to false or default. * Updated example and example dependency.imagesToPdfs method for converting images to single pdf or multiple pdfs.pdfEncryption method for pdf encryption. * Added pdfDecryption method for pdf decryption. * Added pdfValidityAndProtection method for getting pdf validity and protection info.pdfPagesSize method OOM issue also removed redundant properties.positionType in pdfWatermark method which provides various predefined and allows providing custom watermark positions.* AddedpdfPagesSizemethod for getting size info of pages of pdf. * AddedcustomPositionXCoordinatesList, customPositionYCoordinatesListinpdfWatermark` method for more fine controlling of watermark position.pdfWatermark method for watermarking pdf.unEmbedFonts for pdfCompressor.pdfCompressor method for compressing pdf.pdfUri is replaced with pdfPath as now pdfPath is capable of taking care both URI path and absolute file path. * pdfsUris is replaced with pdfsPaths as now pdfsPaths is capable of taking care both URI paths and absolute file paths. * Fixed issue of not being able to use absolute file paths. * Flushing pdfWriters when splitting documents for trying to fix OOfM error in some cases.</details>
dependencies:
pdf_manipulator:
git:
url: https://github.com/whuppi/pdf_manipulator.git
ref: v1.0.0-dev.0
dependencies:
pdf_manipulator: ^1.0.0-dev.0
The last release of Android-only version before the cross-platform rewrite
<!-- release: no-tag -->
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.