Skip to content

Move to the paged document support in Verify 33.3 - #401

Merged
SimonCropp merged 2 commits into
mainfrom
paged-documents
Oct 5, 2026
Merged

SimonCropp merged 2 commits into
mainfrom
paged-documents

Conversation

@SimonCropp

@SimonCropp SimonCropp commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Moves Verify.PdfPig onto the source and derived targets that Verify 33.3 added for paged documents (Verify#1951), and takes the package from 2.7.0 to 3.0.0.

The converter now says which of its targets is the document and which were computed from it. Verify compares the document first, so a file derived from it is only given the benefit of its comparer while the document itself is unchanged, and DiffEngine's viewer shows the files derived from a document beneath it and accepts them with it.

It is a major version because what an existing test suite has to change is listed below. Verify and its adapter are pinned at 33.3.0.

Migrating from 2.x

Version 3 moves to the paged document support in Verify 33.3. The file names are unchanged. What differs:

2.x 3.x
Initialize(PdfPigOutputs.None) VerifierSettings.PageText(PageTextPlacement.None)
Initialize(PdfPigOutputs.Text), Initialize(PdfPigOutputs.All) Initialize()
.PagesToInclude(2), an extension method of this package .PagesToInclude(2), a member of Verify. A call to it compiles unchanged

The info file has the shape every paged document has: the document information under Document, and each page as its Number, its size and rotation under Info, and its Text. Number is 1 based, where the Index it replaces was 0 based. A page with no text has no Text, where it had an empty one.

{                                  {
  Information: {                     Document: {
    Producer: LibreOffice 4.2          Producer: LibreOffice 4.2
  },                                 },
  PageCount: 2,                      PageCount: 2,
  Pages: [                           Pages: [
    {                                  {
      Size: A4,                          Number: 1,
      Text: The first page               Info: {
    },                                     Size: A4
    {                                    },
      Index: 1,                          Text: The first page
      Size: A4,                        },
      Text: The second page            {
    }                                    Number: 2,
  ]                                      Info: {
}                                          Size: A4
                                         },
                                         Text: The second page
                                       }
                                     ]
                                   }

So every .verified.txt changes once, and nothing else does.

Testing

Run locally in Debug against Verify 33.3.0 from nuget.org: all tests pass. That includes a test of PageText(PageTextPlacement.PerPage) with PagesToInclude: there is a text file for the page that is asked for and none for the others, and it keeps the number of its page.

There is a text file for the page that is asked for and none for the others, and it keeps the number of its page.
@SimonCropp SimonCropp added this to the 3.0.0 milestone Oct 5, 2026
@SimonCropp
SimonCropp merged commit d07af0c into main Oct 5, 2026
6 checks passed
@SimonCropp
SimonCropp deleted the paged-documents branch October 5, 2026 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant