From fe1f107ee2a88d59ae745ede5e905b87fb2d5bd5 Mon Sep 17 00:00:00 2001 From: Gunnsteinn Hall Date: Wed, 23 Jan 2019 10:06:34 +0000 Subject: [PATCH] Cleanup for PR --- pdf/internal/e2etest/validate.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pdf/internal/e2etest/validate.go b/pdf/internal/e2etest/validate.go index 7ab21bcf..9d93fec4 100644 --- a/pdf/internal/e2etest/validate.go +++ b/pdf/internal/e2etest/validate.go @@ -16,6 +16,9 @@ import ( "github.com/unidoc/unidoc/common" ) +// To enable ghostscript validation, the path to the binary needs to be specified. +// Set environment variable: +// UNIDOC_GS_BIN_PATH to the path of the ghosccript binary (gs). var ( ghostscriptBinPath = os.Getenv("UNIDOC_GS_BIN_PATH") ) @@ -52,14 +55,13 @@ func validatePdf(path string, password string) (error, int) { outputErr := errOut.String() warnings := strings.Count(outputErr, "****") - common.Log.Error(": - %d warnings %s", warnings, outputErr) + common.Log.Debug("ERROR: - %d warnings %s", warnings, outputErr) if warnings > 1 { if len(outputErr) > 80 { outputErr = outputErr[:80] // Trim the output. } - common.Log.Error("Invalid - %d warnings %s", warnings, outputErr) - //return fmt.Errorf("Invalid - %d warnings (%s)", warnings, outputErr), warnings + common.Log.Debug("ERROR: Invalid - %d warnings %s", warnings, outputErr) return nil, warnings }