LimitationsPDF
What Birch UI PDF does not do, stated plainly: what the rendering engine does not draw or read correctly yet, viewer tools that clear the undo history, text-based comparison, narrow content editing and more.
This page lists what Birch UI PDF does not do, so you can decide before you build. Each point applies to the current version; check this page again after updating.
Rendering#
Pages are drawn by the package's own engine. The list below is ranked: what you are most likely to meet comes first. The support matrix has the detail for each item.
- No full colour management. ICC profiles of the common forms are read and converted to sRGB, and DeviceCMYK is converted by interpolation between process-ink colours. Rendering intents and black point compensation are not applied, version 4 lookup-table profiles (
lutAtoBType), named colour profiles and a profile inside a JPEG 2000 file are not read and fall back to the alternate colour space, and there is no overprint simulation. Colours of CMYK and profile-tagged content are close, not exact. - Fonts that are not embedded are drawn with substitute typefaces. The standard 14 fonts and similar names are drawn with the bundled Liberation and DejaVu faces: positions and widths are the document's, the letter shapes are not those of Helvetica, Times or Courier. CJK fonts that are not embedded are drawn with the fonts of the device, so the result depends on what is installed.
- XFA forms are not supported. A dynamic XFA form shows its static page content and its AcroForm fields like any other PDF. The XFA template is not rendered and XFA data is not read or written.
- Three transparency cases are not modelled. Blend modes inside a non-isolated knockout group see a transparent backdrop. A non-isolated group that is itself painted with a blend mode is treated as isolated. Alpha-is-shape (
AIS), text knockout (TK) and overprint are read and ignored. - A few predefined CMap names are not covered. Every
-Hand-VCMap of Adobe-Japan1, GB1, CNS1, Korea1, Japan2 (Hojo-*,UniHojo-*) and KR (UniAKR-*) is. Not covered:Hankaku,Hiragana,Katakana,RomanandWP-Symbol, andnotdefrangeentries. Text in those encodings is not read correctly. A font of one of the six covered collections withIdentity-Hor a copied CMap and noToUnicodeis read through the CID to Unicode table of its collection. TilingTypeis ignored. Tiling patterns are always drawn at their exact pitch. Other renderers show different seams on rotated patterns.- Variable fonts, CFF2 and colour fonts are not supported, and neither are multiple master Type 1 fonts.
- Some image codings are not decoded. Lossless and arithmetic-coded JPEG, high-throughput JPEG 2000 (HTJ2K) and JPEG 2000 Part 2 extensions, and the colour extension and 12-pixel extended templates of JBIG2. Such an image is drawn as a grey box with a cross and reported as a warning.
- An annotation without an appearance stream is drawn from its dictionary, not as its author saw it. The engine builds the appearance of squares, circles, lines, polygons, ink, text markup, notes, free text and text stamps from their colour, border and geometry. An image stamp, a link border, a redaction mark and a form widget without an appearance stream are not drawn by the render API; the viewer draws those it models in its own layer.
- 3D, video, sound and rich media annotations are not played. With
annotationScope: 'all'they are shown as icons and file attachments can be downloaded; in the default scope they are kept in the file but not listed. - Layer visibility is a view setting. The Layers panel switches optional content on and off for the screen, thumbnails and print; the choice is not saved to the file, and locked layers are not reported. The organizer and compare view use the default visibility.
- JavaScript in the document is never executed, apart from the recognised form scripts described under Forms.
- Text recognition reads printed Latin script only. The package ships its own OCR engine with one model, Latin. Scanned pages in Greek, Cyrillic, Arabic, Hebrew, Indic or CJK scripts, and handwriting, have no text to search, select, compare or redact by pattern unless you pass words from an engine of your own through the text recognition hook. OCR never runs by itself: until a page has been recognised it has no text.
Also worth knowing:
- Page text follows three conventions. Text of annotation appearances, text inside soft-mask groups and text in layers that are switched off are not part of the page text unless you ask for them. See Text.
- 100% zoom is one CSS pixel per point (72 pixels per inch). Pass
zoom: 96 / 72for 96 pixels per inch as other viewers do. - Known differences from poppler are listed under Differences from poppler you will see. The corpus the engine is measured on has 69 pages; it does not prove anything about files outside it.
Viewer#
- Signing clears the undo history. Signing from the viewer saves the document in memory and reloads it, so nothing done before can be undone afterwards. Watermark, header and footer, Bates numbering, crop, flatten and the bookmark commands are ordinary undoable steps.
- The preview after a document tool is unencrypted. After a watermark or a similar tool the viewer hands the renderer an unencrypted copy of a protected document. The copy exists in memory only; the saved file keeps its protection.
- The viewer is designed for tablets and desktops. On a phone-sized viewer the lower-priority toolbar items move into the menu and the tool row wraps; small or tightly stacked form fields can be below the 24 px touch target at low zoom.
- Search results are listed in normalised form. The excerpts in the Search results panel come from the search index, so they are lower-cased (unless Match case is on) with ligatures and white space normalised. The highlights on the page are exact. The panel lists at most 500 matches.
- Console messages are English. Everything shown in the interface comes from
labelsandlocaleText; stamp names such as "Approved" are document content and are not translated. - Printing is vector only where the browser prints PDFs as vectors. With a built-in PDF viewer (
navigator.pdfViewerEnabled) the viewer hands the browser a flattened copy of the document. Chrome and Edge print that copy with real text and line art. Firefox prints it through its own viewer, which draws every page as an image: a file printed to PDF from Firefox has no selectable text in either mode. In the browser tests the copy handed to Chrome is read withpdftotextand contains the text; Chrome's DevTools protocol cannot print a page that shows a PDF, so the last step, Chrome's own print of that copy, is not automated. With the vector path, scaling, margins, headers and footers and page selection are then the browser's, and the end of printing is not reported by every browser, so the hidden print frame may stay for up to ten minutes. Without a PDF viewer, without annotations, for encrypted or permission-restricted documents, with layers switched in the Layers panel, or withmode: 'raster', pages are printed as images at 100, 150 or 300 dpi (up to 600 from code): those print files are large and text is not selectable in a PDF printed that way. Layer choices andannotations: falseare never honoured by the vector path, which is why they select images. - Document tabs are basic. With
tabs, each tab keeps its own session, undo history and view state, but switching away from a tab that is still loading cancels its load, a new tab inherits the zoom of the previous one, andannotationSyncshould not be combined with tabs. - Progressive loading shows estimates first. With a URL or range loader the first page appears before the file has arrived; until the document is editable, page sizes are taken from page 1 and the thumbnails are empty.
- Read aloud and snapshot need the
copypermission, and choosing a snapshot region needs a pointer. Without a callback, read aloud uses the browser's speech synthesis where it exists. - Collaboration needs your transport and your server. The package merges concurrent annotation edits, form values, page rotation, deletion, reordering and blank-page inserts, and tracks presence, each with a documented conflict rule; you carry the messages between users. The relay in
examples/collab-relayis a reference with no persistence and no TLS, not a product. Pages merged from another PDF, crops, content edits, redactions, form field design, bookmarks and attachments are not synchronised, a synchronised page deletion cannot be undone, remote form and page changes land on the local undo stack, and all peers must start from the same file and run the same version.
Annotations#
- "Snap to content" works on corners and vertices. Shapes, lines, measurements, links, text boxes, stamps, images, signatures and form fields snap to path points and edges, text baselines and text box corners of the page when they are drawn or moved. Edge handles, the resize handle of a form field and rotated annotations do not snap to content.
- Edit rights are a rule for the interface, not access control. A user changes only their own annotations and replies, an administrator changes all, and
canEditoverrides both, everywhere in the interface. Any commenter can still reply and set a review status, API calls are never restricted, and the author identity is plain data in the file. - The eraser removes whole strokes of ink annotations. It does not split a stroke and does not act on other annotation types.
- Rotation applies to text boxes, stamps, images, rectangles and ellipses. Other types are rotated by moving their points.
- Vertex editing covers polygons, polylines, perimeters and areas. Their vertices can be moved, added and removed after the shape is finished. Count, arc and angle measurements, ink strokes and callout lines have no point handles; they are moved and scaled as a whole.
- Insert text and Replace text follow upright text. The caret is placed from the text layer of the page; on a line that is rotated on the page the struck-through area is the upright bounding box of the selection, not a slanted quad.
- Mentions are a callback, not a directory. The viewer shows the people your
searchfunction returns and reports new mentions toonMention; it sends no notification itself. The ids of mentioned people live incustomData, which is exported with XFDF and JSON and saved in the PDF under a private key (/LQData) of the annotation; other applications show a mention as plain@Nametext and may drop the key when they rewrite the annotation. - Count, arc and angle measurements use private keys. Other applications show them as dots or line segments without the value.
- Links and media in existing files are annotations only with
annotationScope: 'all'. In the default scope existing links stay plain anchors and open without the confirmation shown for links you follow as annotations. A page link between merged documents becomes a standard action on the second save. - Slanted text markup picks rotated characters by the bounding box of the selected span, so closely spaced parallel rotated lines can be included.
- The annotation clipboard is internal. Copy and paste work inside one viewer, not between browser tabs or applications.
- Groups are private to Birch UI PDF. The group is stored in a private key; other PDF applications show the members as separate annotations.
- Rich text is limited to text boxes. Runs carry bold, italic, underline, strikethrough, colour, size and family, and paragraphs carry alignment. Justified text is read as left-aligned, lists become plain paragraphs, supplied fonts get synthetic bold and italic, and the on-screen editor wraps with browser fonts while the committed drawing uses the saved layout.
- Non-Latin text needs fonts you supply, up front or through
fontFallback, as TrueType or OpenType (CFF) files; no fonts ship with the package, and WOFF, WOFF2 and CFF2 variable fonts are not read. Without a font the save still succeeds: the viewer draws annotation text with the fonts of the browser and stores the drawing as an image mask in the appearance, which is visible everywhere but is not selectable text and drops inline formatting; form field values and everything in the headless engine are written as?and reported inmissingGlyphsof the save result. See When no font can draw a character. Arabic is joined and its marks are positioned through the font's OpenType tables; scripts that need reordering, such as Devanagari, Bengali, Tamil, Khmer and Myanmar, are not laid out correctly, and pair kerning is not applied. Shaping was not compared with HarfBuzz. See Fonts. - Comment summary. The PDF summary needs
fontsfor characters outside Windows-1252 and is refused without them unlessallowMissingGlyphsis set; lines are wrapped with Helvetica metrics, so a line in a wider supplied font can run past the right margin.
Forms#
- XFA forms are not supported. A dynamic XFA form shows its static page content and its AcroForm fields; the XFA template is not rendered and XFA data is not read or written. AcroForm fields are fully supported.
- Scripts are parsed, never executed as JavaScript. The Acrobat
AF*functions and custom calculation, validation, format and keystroke scripts inside the documented safe subset run; anything outside that grammar does not, and stays in the file. Statements in custom scripts need semicolons. - Dynamic barcode fields are detected, not supported. They are shown read-only and are never filled or rewritten.
- Rich text fields use the standard fonts in their appearance; non-Latin runs are not embedded, and setting a plain value drops the formatting.
- Submit actions are never sent. A submit button produces a
formSubmitevent with the payload; the URL comes from the document and is not checked. - Button actions are limited. Reset, submit (as an event), go-to, named and link actions and the recognised scripts run; show/hide actions and other scripts are ignored.
- The form designer edits the border and fill colour of a field, not its text colour, and dragging a multi-selection of fields moves only the dragged field. A duplicated or new radio group gets no separate export values.
- Form controls follow the size of the fields in the PDF, so small fields can be below the recommended touch target size.
Saving and document tools#
- A full rewrite invalidates existing signatures. The viewer warns in the console; nothing stops the save.
optimizePdfsubsets only some fonts, and only withfonts: true: TrueType programs and the CFF programs of composite fonts. Type 1 programs, simple fonts with a CFF program, fonts with unusual encodings and every font a form can still type with are left whole. It refuses encrypted and signed files. Withimagesit downsamples what the package can decode; masked images, JPEG 2000, JBIG2 and CCITT data are left alone, and colour profiles of resampled images are dropped.- Cropping hides, it does not remove. The content outside the crop box stays in the file.
- Watermarks are text.
addWatermarkhas no image option; add an image per page withaddPageImage. - Attachments are stored, not previewed. Any file can be embedded and handed to your application with
attachmentOpen, but the viewer shows only PDF and email attachments itself (in a new tab). Checksums are MD5, as the format defines them. Portfolios are read and listed as a table; they cannot be created or edited, and folders are ignored./AFRelationshipand the catalog/AFarray are written, which PDF/A-3 needs, andconvertToPdfAkeeps attachments only on request, without checking that they are PDF/A themselves. An incremental save keeps a removed attachment's bytes in the earlier revision. See Attachments limits. - PDF/A-2b conversion does not repair everything.
convertToPdfAadds the output intent and metadata, removes what PDF/A forbids, gives annotations an appearance and replaces fonts that are not embedded with metric-compatible TrueType fonts you supply; without them it refuses with an error that names the font. Its output passes veraPDF (PDF/A-2b) for the office-made files, scans and samples of the test set. CMYK and spot colour content, inline image interpolation, content streams with unknown operators or missing resources, and transparency are reported, not converted: such a file getsisConformant: falseand veraPDF rejects it. Replaced fonts keep the original character codes, so a replacement that is not metric-compatible changes the spacing of the text. See what the validator checks. - Linearised ("fast web view") output is a full rewrite without object streams.
save({ linearize: true })andlinearizePdfpassqpdf --check-linearization, but the file is larger than the default compact output, encrypted and signed input is refused, and the file stops being linearised as soon as an incremental update is appended to it. The viewer has no menu command for it. - Page organizer. Resizing with scaled content keeps proportions, duplicated pages get renamed form fields, and the split dialog offers top-level bookmarks only. A password-protected second document is asked for its password; pages of a file whose permissions forbid copying are refused unless the owner password is given.
Redaction#
- JPEG 2000, JBIG2 and CCITT images need a decoder in the headless API. JPEG and uncompressed or Flate images are redacted pixel by pixel by the package. The viewer handles the other formats through the page rendering; headless, pass
decodeImage, and without it an image touched by a redaction is removed entirely and the report says so. - A redacted JPEG is written as a baseline JPEG again. The 8 or 16 pixel blocks a mark does not touch are copied without recompression, so the rest of the picture is unchanged and the file keeps its size (a 0.36 MB progressive A4 scan at 300 dpi stayed 0.36 MB; the same scan as a 0.47 MB baseline file with standard tables shrank to 0.36 MB). The blocks a mark touches are compressed again with the tables of the source: pixels within one block of the edge of a mark can change by a few levels, and under the edge of the mark the image is close to black (exactly black one block further in) beneath the black box that is drawn over it. A progressive file becomes a baseline file. Images from lossless sources, and rasters from a
decodeImagecallback for anything that was not a JPEG, are stored without loss and without the original colour profile, as RGB, grey or 1-bit. - Redacting an image through the rendered page bakes in what is drawn over it. In the viewer, JPEG 2000, JBIG2 and CCITT images are replaced by a raster sampled from the page rendering, so visible content drawn on top of the image becomes part of it.
- Only page content is redacted, not metadata, bookmarks, attachments or other pages' form values.
- See What redaction does not do.
Signatures#
- Revocation data comes from you or from the file. OCSP responses (signed by the issuer or a delegated responder) and complete CRLs are read from the document security store, the signature, the
ocspsandcrlsoptions and thecheckRevocationcallback; the package never fetches them. Indirect, delta and partitioned CRLs are not read, and the responder certificate's own revocation is not checked. Data that is no longer current counts asunknown, andunknownornot-checkedfails a signature only withrequireRevocation. - Trust is what you supply. Chains are built to the roots in
trustedCertificatesortrustedRoots, and validity dates are checked. There is no built-in trust list (no AATL, no EUTL, no operating-system store), and certificate policies, key usage, name and path-length constraints are not enforced. Validity periods of intermediate certificates are not checked. padesLeveldescribes the structure of the file (B-B, B-T, B-LT, B-LTA); it is not an ETSI EN 319 102 conformance result. Timestamp accuracy and nonces are ignored.- No timestamp, OCSP or CRL client. The
timestamp,fetchandcheckRevocationcallbacks are where you make the request. - PKCS#12 files with public-key protection are not read. Password-protected
.p12and.pfxfiles are, including legacy 3DES and RC2 ones; that legacy decryption is plain TypeScript and not constant-time. Other keys are unencrypted PKCS#8 PEM, aCryptoKey, or an external signer throughsignDigest. - RSA and ECDSA only (P-256, P-384, P-521). Ed25519, Ed448 and DSA are reported as unsupported.
- Strict about changes after signing. Hiding, moving, restyling or removing an annotation or field that existed when a document was signed makes that signature invalid, as does any change to page content or resources. Deleting a comment that predates a signature therefore invalidates it. A later signer's own signature appearance is not checked for covering content.
- The sign dialog in the viewer reads key files in the browser. That suits tests and internal tools. For production signing, keep keys in an HSM or a signing service and use
signDigest. - An electronic signature is a picture. The Signature tool and "Sign here" do not create a certificate signature.
Encryption#
- Password encryption only. Certificate (public-key) encryption is not supported: such files cannot be opened, signed or verified. Reading them needs RSA key transport with the recipient's private key, which Web Crypto does not offer for the PKCS#1 v1.5 padding these files use; it was left out of this version rather than added in plain TypeScript.
- Permissions are enforced by this package only. A document opened with the user password blocks what its flags deny, in the viewer and with a
PdfPermissionErrorin the headless API; the owner password orignorePermissionslifts the block. The permissions of the first document govern the session, andignorePermissionsis read when a document opens. Permission flags are not cryptographic: any tool that ignores them can still do everything. - RC4 is offered for compatibility and should not be used for new files.
Compare#
comparePdfis text-based, word by word. It is not a pixel comparison: changes to images, drawings, fonts, colours or layout that leave the words unchanged are not reported by it, and annotations and form values are not compared.- The visual comparison exists only in the compare view. Its Visual mode renders both documents and marks the pixels that differ, which shows changed images, drawings, colours and annotations as areas but does not say what changed. It compares the page pairs the text comparison aligned, so reflowed text differs from the point of the change to the end of the page. Pages are compared as they are scrolled into view, on the main thread, and the list of changed areas is complete only once every page has been shown. There is no headless visual comparison of two files;
diffPixelscompares two images you rendered yourself. - Reading order comes from the content stream, so multi-column layouts can produce more "moved" text than a person would see.
- The compare view uses default options. A copy-restricted file opened with its user password cannot be compared unless
ignorePermissionsis set.
Content editing#
- Image formats. PNG, JPEG, GIF (first frame), BMP and strip-based TIFF are read by the package; WebP, SVG and other formats need the
decodeImagecallback, which the viewer supplies from the browser and the headless engine does not. SVG is rasterised, colour profiles and EXIF orientation of added images are not applied, and tiled, JPEG-compressed or CMYK TIFF is rejected. See Image formats. extractImagesdoes not decode JPEG 2000, JBIG2 or CCITT fax data. Those come back as the stored bytes (status: 'encoded-only'); in the viewerrenderFallback: trueadds pixels sampled from the rendered page, markedisRendered. Lab, Separation, DeviceN and Pattern colour spaces areunsupported, ICC profiles are not applied, CMYK is converted without colour management, and images inside form XObjects are not listed.- Paragraph editing reflows inside one block only. A left-aligned paragraph in one font and size can be edited as a whole and is broken into lines again within its original width; a longer text continues downwards over whatever lies below, because nothing else on the page moves. Paragraphs with mixed fonts, indents, centred or justified lines are edited run by run in a single-line editor without reflow. Outlines of rotated runs and images are upright bounding boxes, and images resize along the page axes only. Images inside form XObjects and inline images are not listed for editing, and moving text translates a run without rotating or scaling it. Many fonts in real files are subsets that lack the characters you want to type. See Content editing limits.
Accessibility#
- The tag structure is read by the engine itself. Tagged PDFs get headings, paragraphs, lists, tables, figures with alternative text and links in reading order; untagged PDFs give screen readers the page text in the order the text extractor returns it.
- Some actions need a pointer: drawing freehand, drawing a signature and the marquee zoom. Each has a keyboard alternative of a simpler kind (a default stroke, a typed signature, zoom shortcuts). The vertices of a polygon, polyline or measurement are placed with a keyboard crosshair, and the eraser walks the strokes of a drawing with Tab and erases the focused one; the keyboard eraser removes whole strokes of one drawing at a time and has no free-moving eraser tip.
- Vertex, edge and stroke handles are not separate focus stops for assistive technology. They are reached with Tab from the focused annotation, drawn with a visible focus mark and announced through the live region ("Vertex 2 of 5"), but DOM focus stays on the annotation.
- Text selection for markup relies on the browser's caret browsing when no pointer is used.
- The target-size rule is not enforced on form fields at default zoom, because field sizes come from the PDF. The rest of the automated accessibility scan covers the form layer.
Platform#
- Browsers. The viewer needs a current evergreen browser with
ResizeObserver, pointer events and, for signatures and encryption, Web Crypto on a secure origin. - Node. The headless API needs Node 20 or later for signatures and encryption; the rest works wherever
Uint8ArrayandstructuredCloneexist. - Rendering runs in a worker, the document engine does not. Pages are parsed and rasterised in a worker by default, and on the main thread in time slices where
WorkerorOffscreenCanvasis missing. Saving, comparing and redacting run on the calling thread, so large files block the main thread unless you call the headless API in a worker yourself. - Memory. The whole file is held in memory, by the viewer's document engine and by the render worker. Files of several hundred megabytes are outside what a browser tab handles comfortably.