From 31c1da203bd00ff9e9ba602257bab2b4282ca945 Mon Sep 17 00:00:00 2001 From: Kurt Jung Date: Mon, 12 Oct 2015 10:34:43 -0400 Subject: Add reference PDFs for comparison purposes. Document comparison of example documents. --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 95fe304..25d68c3 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,19 @@ 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. +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 the 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 From f10939e21402781b0b6223dd64110df2da085ba0 Mon Sep 17 00:00:00 2001 From: Kurt Jung Date: Tue, 13 Oct 2015 18:38:33 -0400 Subject: Include links to reference PDFs in README --- README.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 25d68c3..8e0954a 100644 --- a/README.md +++ b/README.md @@ -114,6 +114,49 @@ 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. +[AddFont](pdf/reference/Fpdf_AddFont.pdf) +[AddLayer](pdf/reference/Fpdf_AddLayer.pdf) +[AddPage](pdf/reference/Fpdf_AddPage.pdf) +[Beziergon](pdf/reference/Fpdf_Beziergon.pdf) +[Bookmark](pdf/reference/Fpdf_Bookmark.pdf) +[CellFormat 1 tables](pdf/reference/Fpdf_CellFormat_1_tables.pdf) +[CellFormat 2 align](pdf/reference/Fpdf_CellFormat_2_align.pdf) +[CellFormat 3 codepageescape](pdf/reference/Fpdf_CellFormat_3_codepageescape.pdf) +[CellFormat 4 codepage](pdf/reference/Fpdf_CellFormat_4_codepage.pdf) +[Circle figures](pdf/reference/Fpdf_Circle_figures.pdf) +[ClipText](pdf/reference/Fpdf_ClipText.pdf) +[CreateTemplate](pdf/reference/Fpdf_CreateTemplate.pdf) +[DrawPath fill](pdf/reference/Fpdf_DrawPath_fill.pdf) +[HTMLBasicNew](pdf/reference/Fpdf_HTMLBasicNew.pdf) +[Image](pdf/reference/Fpdf_Image.pdf) +[LinearGradient gradient](pdf/reference/Fpdf_LinearGradient_gradient.pdf) +[MoveTo path](pdf/reference/Fpdf_MoveTo_path.pdf) +[MultiCell](pdf/reference/Fpdf_MultiCell.pdf) +[PageSize](pdf/reference/Fpdf_PageSize.pdf) +[Polygon](pdf/reference/Fpdf_Polygon.pdf) +[RegisterImage](pdf/reference/Fpdf_RegisterImage.pdf) +[RegisterImageReader url](pdf/reference/Fpdf_RegisterImageReader_url.pdf) +[SVGBasicWrite](pdf/reference/Fpdf_SVGBasicWrite.pdf) +[SetAcceptPageBreakFunc landscape](pdf/reference/Fpdf_SetAcceptPageBreakFunc_landscape.pdf) +[SetAlpha transparency](pdf/reference/Fpdf_SetAlpha_transparency.pdf) +[SetFontLoader](pdf/reference/Fpdf_SetFontLoader.pdf) +[SetKeywords](pdf/reference/Fpdf_SetKeywords.pdf) +[SetLeftMargin multicolumn](pdf/reference/Fpdf_SetLeftMargin_multicolumn.pdf) +[SetLineJoinStyle caps](pdf/reference/Fpdf_SetLineJoinStyle_caps.pdf) +[SetProtection](pdf/reference/Fpdf_SetProtection.pdf) +[Splitlines](pdf/reference/Fpdf_Splitlines.pdf) +[TransformBegin](pdf/reference/Fpdf_TransformBegin.pdf) +[WriteAligned](pdf/reference/Fpdf_WriteAligned.pdf) +[barcode Register](pdf/reference/contrib_barcode_Register.pdf) +[barcode RegisterCodabar](pdf/reference/contrib_barcode_RegisterCodabar.pdf) +[barcode RegisterCode128](pdf/reference/contrib_barcode_RegisterCode128.pdf) +[barcode RegisterCode39](pdf/reference/contrib_barcode_RegisterCode39.pdf) +[barcode RegisterDataMatrix](pdf/reference/contrib_barcode_RegisterDataMatrix.pdf) +[barcode RegisterEAN](pdf/reference/contrib_barcode_RegisterEAN.pdf) +[barcode RegisterQR](pdf/reference/contrib_barcode_RegisterQR.pdf) +[barcode RegisterTwoOfFive](pdf/reference/contrib_barcode_RegisterTwoOfFive.pdf) +[httpimg Register](pdf/reference/contrib_httpimg_Register.pdf) + ##Nonstandard Fonts -- cgit v1.2.1-24-ge1ad From 2efaba8cfa054408af1330401b8b7741975f77ae Mon Sep 17 00:00:00 2001 From: Kurt Jung Date: Tue, 20 Oct 2015 12:10:08 -0400 Subject: Correct typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 8e0954a..28d579f 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ 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 the ComparePDFFiles() to check the example PDF for equality +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 -- cgit v1.2.1-24-ge1ad From f45e5e9196bb313883f36e0ccc72f052f46aa37e Mon Sep 17 00:00:00 2001 From: Kurt Jung Date: Tue, 20 Oct 2015 12:24:07 -0400 Subject: Remove listing of reference PDFs in README --- README.md | 45 +-------------------------------------------- 1 file changed, 1 insertion(+), 44 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 28d579f..fdcbac4 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ 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 @@ -114,49 +114,6 @@ 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. -[AddFont](pdf/reference/Fpdf_AddFont.pdf) -[AddLayer](pdf/reference/Fpdf_AddLayer.pdf) -[AddPage](pdf/reference/Fpdf_AddPage.pdf) -[Beziergon](pdf/reference/Fpdf_Beziergon.pdf) -[Bookmark](pdf/reference/Fpdf_Bookmark.pdf) -[CellFormat 1 tables](pdf/reference/Fpdf_CellFormat_1_tables.pdf) -[CellFormat 2 align](pdf/reference/Fpdf_CellFormat_2_align.pdf) -[CellFormat 3 codepageescape](pdf/reference/Fpdf_CellFormat_3_codepageescape.pdf) -[CellFormat 4 codepage](pdf/reference/Fpdf_CellFormat_4_codepage.pdf) -[Circle figures](pdf/reference/Fpdf_Circle_figures.pdf) -[ClipText](pdf/reference/Fpdf_ClipText.pdf) -[CreateTemplate](pdf/reference/Fpdf_CreateTemplate.pdf) -[DrawPath fill](pdf/reference/Fpdf_DrawPath_fill.pdf) -[HTMLBasicNew](pdf/reference/Fpdf_HTMLBasicNew.pdf) -[Image](pdf/reference/Fpdf_Image.pdf) -[LinearGradient gradient](pdf/reference/Fpdf_LinearGradient_gradient.pdf) -[MoveTo path](pdf/reference/Fpdf_MoveTo_path.pdf) -[MultiCell](pdf/reference/Fpdf_MultiCell.pdf) -[PageSize](pdf/reference/Fpdf_PageSize.pdf) -[Polygon](pdf/reference/Fpdf_Polygon.pdf) -[RegisterImage](pdf/reference/Fpdf_RegisterImage.pdf) -[RegisterImageReader url](pdf/reference/Fpdf_RegisterImageReader_url.pdf) -[SVGBasicWrite](pdf/reference/Fpdf_SVGBasicWrite.pdf) -[SetAcceptPageBreakFunc landscape](pdf/reference/Fpdf_SetAcceptPageBreakFunc_landscape.pdf) -[SetAlpha transparency](pdf/reference/Fpdf_SetAlpha_transparency.pdf) -[SetFontLoader](pdf/reference/Fpdf_SetFontLoader.pdf) -[SetKeywords](pdf/reference/Fpdf_SetKeywords.pdf) -[SetLeftMargin multicolumn](pdf/reference/Fpdf_SetLeftMargin_multicolumn.pdf) -[SetLineJoinStyle caps](pdf/reference/Fpdf_SetLineJoinStyle_caps.pdf) -[SetProtection](pdf/reference/Fpdf_SetProtection.pdf) -[Splitlines](pdf/reference/Fpdf_Splitlines.pdf) -[TransformBegin](pdf/reference/Fpdf_TransformBegin.pdf) -[WriteAligned](pdf/reference/Fpdf_WriteAligned.pdf) -[barcode Register](pdf/reference/contrib_barcode_Register.pdf) -[barcode RegisterCodabar](pdf/reference/contrib_barcode_RegisterCodabar.pdf) -[barcode RegisterCode128](pdf/reference/contrib_barcode_RegisterCode128.pdf) -[barcode RegisterCode39](pdf/reference/contrib_barcode_RegisterCode39.pdf) -[barcode RegisterDataMatrix](pdf/reference/contrib_barcode_RegisterDataMatrix.pdf) -[barcode RegisterEAN](pdf/reference/contrib_barcode_RegisterEAN.pdf) -[barcode RegisterQR](pdf/reference/contrib_barcode_RegisterQR.pdf) -[barcode RegisterTwoOfFive](pdf/reference/contrib_barcode_RegisterTwoOfFive.pdf) -[httpimg Register](pdf/reference/contrib_httpimg_Register.pdf) - ##Nonstandard Fonts -- cgit v1.2.1-24-ge1ad