pdf_test_fixtures
library
Functions
-
adobeRgb1998Icc()
→ Uint8List
-
-
ascii(String s)
→ Uint8List
-
-
buildAcroFormPdf()
→ Uint8List
-
Builds a one-page PDF with an interactive AcroForm:
-
buildAnnotatedPdf()
→ Uint8List
-
Builds a 3-page PDF whose first page carries interactive annotations:
-
buildAppearanceAnnotationsPdf()
→ Uint8List
-
Builds a one-page PDF whose annotations carry appearance streams:
-
buildClassicPdf()
→ Uint8List
-
Builds a minimal one-page PDF with a classic cross-reference table.
-
buildEmbeddedFontPdf()
→ Uint8List
-
One-page PDF whose text uses an embedded TrueType font (see
buildTestTrueTypeFont); the page shows "AB" at 24pt.
-
buildEncryptedPdf({int revision = 3, String userPassword = '', String ownerPassword = 'owner'})
→ Uint8List
-
Builds an encrypted one-page PDF ("Hello, world!" plus an /Info whose
/Title is the encrypted string "Secret Title").
-
buildMultiPagePdf(int pageCount)
→ Uint8List
-
Builds a
pageCount-page PDF; page N shows the text "Page N".
-
buildNestedPageTreePdf()
→ Uint8List
-
Builds a 3-page PDF with a nested page tree exercising attribute
inheritance (§7.7.3.4):
-
buildTestCffFont()
→ Uint8List
-
Builds a minimal CFF (Type1C) font: glyph 0 = .notdef, glyph 1 = an
800x800 square at the origin, mapped to character code 65 ('A') with
advance width 660 (via nominalWidthX 600 + leading operand 60).
-
buildTestJpeg()
→ Uint8List
-
A real, decodable 8x8 solid-red JPEG (CoreGraphics, quality 1.0).
Decodes to r=254, g=0, b=0 within codec tolerance.
-
buildTestTrueTypeFont({bool includeCmap = true, bool includePost = false})
→ Uint8List
-
Builds a minimal TrueType font, unitsPerEm 1000, three glyphs:
0 = .notdef (empty), 1 = 'A' (triangle, advance 600),
2 = 'B' (square, advance 1000). The cmap is a (3,1) format 4 table.
-
buildVariedHeightPdf(int pageCount)
→ Uint8List
-
Builds a
pageCount-page PDF whose page heights cycle 792, 396,
1008 pt (all 612 wide); page N shows the text "Page N" near its top.
Mixed sizes defeat any uniform-extent estimate, exercising viewers
that must place far-away pages exactly (search jumps, links).
-
buildXrefStreamPdf()
→ Uint8List
-
Builds a PDF in the "modern" 1.5+ layout: an uncompressed cross-reference
stream, with the catalog and page tree packed into an object stream.
-
displayP3Icc()
→ Uint8List
-
-
genericCmykIcc()
→ Uint8List
-
-
genericGrayIcc()
→ Uint8List
-