MCPcopy Create free account
hub / github.com/tmc/langchaingo / NewPDF

Function NewPDF

documentloaders/pdf.go:32–41  ·  view source on GitHub ↗

NewPDF creates a new text loader with an io.Reader.

(r io.ReaderAt, size int64, opts ...PDFOptions)

Source from the content-addressed store, hash-verified

30
31// NewPDF creates a new text loader with an io.Reader.
32func NewPDF(r io.ReaderAt, size int64, opts ...PDFOptions) PDF {
33 pdf := PDF{
34 r: r,
35 s: size,
36 }
37 for _, opt := range opts {
38 opt(&pdf)
39 }
40 return pdf
41}
42
43// getPassword returns the password for the PDF
44// it than clears the password on the struct, so it can't be used again

Callers 3

newLoaderMethod · 0.85
TestPDFLoaderFunction · 0.85
TestPDFTextSplitFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestPDFLoaderFunction · 0.68
TestPDFTextSplitFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…