diff options
author | Kurt <kurt.w.jung@gmail.com> | 2017-09-03 10:33:44 -0400 |
---|---|---|
committer | Kurt <kurt.w.jung@gmail.com> | 2017-09-03 10:33:44 -0400 |
commit | 80056ce99a3165ac9c1ac71042d3a5e85225c3df (patch) | |
tree | 3b17e795a2d933529832b981f13423efc6d11e03 | |
parent | c9ef411491aa67191182dc611221704bdebae41b (diff) |
Note the conditions in which the PDFs generated during the test are compared with reference files.
-rw-r--r-- | README.md | 20 | ||||
-rw-r--r-- | doc.go | 20 |
2 files changed, 22 insertions, 18 deletions
@@ -116,15 +116,17 @@ some helper routines, for example exampleFilename() and summary(). Example PDFs can be compared with reference copies in order to verify that they have been generated as expected. This comparison will be performed if a PDF with the same name as the example PDF is placed in the gofpdf/pdf/reference -directory. The routine that summarizes an example will look for this file and, -if found, will call ComparePDFFiles() to check the example PDF for equality -with its reference PDF. If differences exist between the two files they will be -printed to standard output and the test will fail. If the reference file is -missing, the comparison is considered to succeed. In order to successfully -compare two PDFs, the placement of internal resources must be consistent and -the internal creation timestamps must be the same. To do this, the methods -SetCatalogSort() and SetCreationDate() need to be called for both files. This -is done automatically for all examples. +directory and if the third argument to ComparePDFFiles() in +internal/example/example.go is true. (By default it is false.) The routine that +summarizes an example will look for this file and, if found, will call +ComparePDFFiles() to check the example PDF for equality with its reference PDF. +If differences exist between the two files they will be printed to standard +output and the test will fail. If the reference file is missing, the comparison +is considered to succeed. In order to successfully compare two PDFs, the +placement of internal resources must be consistent and the internal creation +timestamps must be the same. To do this, the methods SetCatalogSort() and +SetCreationDate() need to be called for both files. This is done automatically +for all examples. ## Nonstandard Fonts @@ -130,15 +130,17 @@ some helper routines, for example exampleFilename() and summary(). Example PDFs can be compared with reference copies in order to verify that they have been generated as expected. This comparison will be performed if a PDF with the same name as the example PDF is placed in the gofpdf/pdf/reference -directory. The routine that summarizes an example will look for this file and, -if found, will call ComparePDFFiles() to check the example PDF for equality -with its reference PDF. If differences exist between the two files they will be -printed to standard output and the test will fail. If the reference file is -missing, the comparison is considered to succeed. In order to successfully -compare two PDFs, the placement of internal resources must be consistent and -the internal creation timestamps must be the same. To do this, the methods -SetCatalogSort() and SetCreationDate() need to be called for both files. This -is done automatically for all examples. +directory and if the third argument to ComparePDFFiles() in +internal/example/example.go is true. (By default it is false.) The routine that +summarizes an example will look for this file and, if found, will call +ComparePDFFiles() to check the example PDF for equality with its reference PDF. +If differences exist between the two files they will be printed to standard +output and the test will fail. If the reference file is missing, the comparison +is considered to succeed. In order to successfully compare two PDFs, the +placement of internal resources must be consistent and the internal creation +timestamps must be the same. To do this, the methods SetCatalogSort() and +SetCreationDate() need to be called for both files. This is done automatically +for all examples. Nonstandard Fonts |