diff --git a/internal/debate/pdf.go b/internal/debate/pdf.go index 3a6e290..ccc190e 100644 --- a/internal/debate/pdf.go +++ b/internal/debate/pdf.go @@ -93,13 +93,13 @@ func (pdfDoc *PDFDocument) extractPDFStylesOnly(options *ExtractPDFOptions) erro if p.V.IsNull() { continue } - pt, pterr := p.GetPlainText(nil) + _, pterr := p.GetPlainText(nil) if pterr != nil { if pterr.Error() == "malformed PDF: reading at offset 0: stream not present" { fmt.Println("**WILL IGNORE!!!! *****") continue } - return fmt.Errorf(" GetPlainText ERROR: %w", pt) + return fmt.Errorf(" GetPlainText ERROR: %w", pterr) } // Top 10 @@ -151,13 +151,13 @@ func (pdfDoc *PDFDocument) extractPDFLinesOnly(options *ExtractPDFOptions) error if p.V.IsNull() { continue } - pt, pterr := p.GetPlainText(nil) + _, pterr := p.GetPlainText(nil) if pterr != nil { if pterr.Error() == "malformed PDF: reading at offset 0: stream not present" { fmt.Println("**WILL IGNORE!!!! *****") continue } - return fmt.Errorf(" GetPlainText ERROR: %w", pt) + return fmt.Errorf(" GetPlainText ERROR: %w", pterr) } // Top 10 lines for this page by line analysis @@ -217,13 +217,13 @@ func (pdfDoc *PDFDocument) extractPDF(options *ExtractPDFOptions) error { continue } // copy over plain text; short form - pt, pterr := p.GetPlainText(nil) + _, pterr := p.GetPlainText(nil) if pterr != nil { if pterr.Error() == "malformed PDF: reading at offset 0: stream not present" { fmt.Println("**WILL IGNORE!!!! *****") continue } - return fmt.Errorf(" GetPlainText ERROR: %w", pt) + return fmt.Errorf(" GetPlainText ERROR: %w", pterr) } // NO need this ,. //pdfPage.PDFPlainText = pt diff --git a/internal/hansard/pdf.go b/internal/hansard/pdf.go index f14bf46..8176ff7 100644 --- a/internal/hansard/pdf.go +++ b/internal/hansard/pdf.go @@ -79,7 +79,7 @@ func (pdfDoc *PDFDocument) extractPDF() error { fmt.Println("**WILL IGNORE!!!! *****") continue } - return fmt.Errorf(" GetPlainText ERROR: %w", pt) + return fmt.Errorf(" GetPlainText ERROR: %w", pterr) } pdfPage.PDFPlainText = pt // processStyleChanges ..