summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorKurt Jung <kurt.w.jung@gmail.com>2015-10-20 12:26:10 -0400
committerKurt Jung <kurt.w.jung@gmail.com>2015-10-20 12:26:10 -0400
commite2d935b7215daa9476f1ca385a15227f5f5a7011 (patch)
tree56b837702a1d3b036e081506513d79913389875f /README.md
parent26baf7d305543d6afe39d38f0b2c30054c9fa4e3 (diff)
parentf45e5e9196bb313883f36e0ccc72f052f46aa37e (diff)
Merge pull request #49 from jung-kurt/compare-reference-pdf
Compare example PDFs with reference copies
Diffstat (limited to 'README.md')
-rw-r--r--README.md15
1 files changed, 14 insertions, 1 deletions
diff --git a/README.md b/README.md
index 95fe304..fdcbac4 100644
--- a/README.md
+++ b/README.md
@@ -99,7 +99,20 @@ complete.
Please note that these examples run in the context of a test. In order run an
example as a standalone application, you'll need to examine [fpdf_test.go](https://github.com/jung-kurt/gofpdf/blob/master/fpdf_test.go) for
-some helper routines, for example exampleFilename and summary.
+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.
##Nonstandard Fonts