From 80056ce99a3165ac9c1ac71042d3a5e85225c3df Mon Sep 17 00:00:00 2001 From: Kurt Date: Sun, 3 Sep 2017 10:33:44 -0400 Subject: Note the conditions in which the PDFs generated during the test are compared with reference files. --- README.md | 20 +++++++++++--------- doc.go | 20 +++++++++++--------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index d74aa70..d0cd77c 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/doc.go b/doc.go index 00bbf21..4c63289 100644 --- a/doc.go +++ b/doc.go @@ -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 -- cgit v1.2.1-24-ge1ad