API reference
Everything public is in the PDiffy namespace. This page groups the types by what you'd use them for; the sidebar lists
them all.
Snapshot tests
| Type |
Use it to |
| Snapshot |
Compare a PDF, a Word document, text or JSON with its approved snapshot, and set the snapshot folder for every kind |
| SnapshotException |
Read the failure a snapshot test throws, with what changed |
Options
| Type |
Use it to |
| PdfSnapshotOptions |
Ignore, scrub or limit a PDF snapshot, and name it |
| PdfSection, PdfDetail |
Name the PDF sections and details to leave out |
| PdfProfile, PdfTolerance |
Pick what a test guards, and the numbers it lets differ a little |
| DocxSnapshotOptions |
Ignore or scrub a Word snapshot, and name it |
| DocxSection, DocxDetail |
Name the Word sections and details to leave out |
| DocxCheck, DocxCheckFinding, DocxCheckCategory, DocxCheckSet |
Name a rule Check applies, describe what it found, and choose the rules |
| TextSnapshotOptions |
Scrub a text or JSON snapshot, and name it |
| FileSnapshotOptions |
Name the snapshot of a file on disk |
Comparing
| Type |
Use it to |
| DocumentDiff |
Hold the differences between two documents or snapshots, and print them as a summary, HTML or JSON |
| DocumentChange |
Describe one difference: kind, section, path, page, detail, accessibility flag |
| ChangeKind |
Name the kind of a difference |
Checks
The PDF model
PdfUaDocument is everything PDiffy reads from a PDF, in the order a snapshot prints it.
| Type |
Holds |
| PdfDocumentInfo, PdfMetadata, PdfSettings, PdfAction |
Document-wide facts, metadata, settings and the actions the file runs when it opens |
| PdfPage, PdfPageLabelRange, PdfBookmark |
Pages, page labels and the outline |
| PdfStructureElement, PdfRoleMapping |
The tag tree and custom tag types |
| PdfPageText |
Artifact and untagged text, per page |
| PdfFont |
Fonts and the codes that don't map to Unicode |
| PdfAnnotation, PdfBorder, PdfFormField |
Annotations, their borders and form fields |
| PdfTextRun, PdfImage, PdfVectorPath |
What's drawn on each page |
Constants and flags that list every option, so you never need to know PDF names:
| Type |
Lists |
| PdfStructureTypes |
Every standard tag type, such as Figure or H1 |
| PdfNamespaces |
The standard structure namespaces, such as PDF 2.0's |
| PdfContentRole |
Tagged, artifact or untagged |
| PdfTextRenderMode |
How text is drawn, such as Invisible |
| PdfAnnotationFlags |
Annotation flags, such as Hidden |
| PdfFormFieldType, PdfFormFieldFlags |
Form field types and flags |
| PdfPermissions |
What an encrypted document allows |
| PdfPageModes, PdfPageLayouts |
How the file opens |
| PdfAnnotationTypes, PdfBorderStyles, PdfActionTypes, PdfDestinationViews |
Annotation types, border styles, actions and the views a destination shows |
| PdfTabOrders |
A page's tab order |
| PdfTableScopes, PdfListNumberings |
Table header scopes and list numbering |
| PdfPageLabelStyles |
Page label numbering, such as roman numerals |
| PdfArtifactTypes, PdfArtifactSubtypes |
Artifact kinds, such as Pagination and Header |
| PdfFontTypes |
Font types, such as TrueType |
| PdfFileRelationships |
How an attached file relates to the document |
The Word model
DocxDocument is everything PDiffy reads from a DOCX file.
| Type |
Holds |
| DocxDocumentInfo, DocxPageSetup |
Document settings and each section's page setup |
| DocxStyle, DocxList |
Styles in use and lists |
| DocxBlock |
A paragraph, table, content control or inserted document: DocxParagraph, DocxTable, DocxControl, DocxInserted |
| DocxInline |
Something inside a paragraph, such as a DocxLink, DocxField, DocxImage or DocxRevision |
| DocxHeaderFooter, DocxNote |
Headers, footers, notes and comments |
| DocxBorder, DocxMargin, DocxTabStop, DocxLineSpacing, DocxWidth, DocxRowHeight |
Borders, cell margins, tab stops, line spacing, widths and row heights |
| Type |
Lists |
| DocxRevisionKind |
Every kind of tracked change |
| DocxFormKind |
Content control and legacy form field kinds |
| DocxNoteKind |
Footnotes, endnotes and comments |
| DocxAlignments |
Paragraph alignment, where both means justified |
| DocxStyleTypes |
Style types |
| DocxSectionBreaks, DocxHeaderFooterKinds, DocxBreakKinds |
How sections start, header and footer kinds, and page and column breaks |
| DocxGraphicKinds |
Pictures, shapes, charts and other drawings |
| DocxUnderlines, DocxHighlights, DocxRunVerticalAligns |
Underlines, highlight colors, superscript and subscript |
| DocxCellMerges, DocxCellVerticalAligns, DocxTextDirections |
Merged cells, where a cell's text sits and which way it runs |
| DocxProtections |
What editing a protected document allows |
| DocxWidthUnit, DocxSizeRules |
Width units, and how line spacing and row heights are measured |