Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/SebastiaanKlippert/go-wkhtmltopdf
/ functions
Functions
122 in github.com/SebastiaanKlippert/go-wkhtmltopdf
⨍
Functions
122
◇
Types & classes
29
↓ 52 callers
Method
Set
(key, value string)
options.go:225
↓ 21 callers
Method
AddPage
AddPage adds a new input page to the document. A page is an input HTML page, it can span multiple pages in the output document. It is a Page when read
wkhtmltopdf.go:203
↓ 18 callers
Method
Create
Create creates the PDF document and stores it in the internal buffer if no error is returned
wkhtmltopdf.go:315
↓ 16 callers
Function
NewPDFGenerator
NewPDFGenerator returns a new PDFGenerator struct with all options created and checks if wkhtmltopdf can be found on the system
wkhtmltopdf.go:382
↓ 13 callers
Method
Args
()
wkhtmltopdf.go:109
↓ 12 callers
Function
NewPageReader
NewPageReader creates a new PageReader from an io.Reader
wkhtmltopdf.go:99
↓ 8 callers
Method
ArgString
ArgString returns Args as a single string
wkhtmltopdf.go:196
↓ 8 callers
Method
Bytes
Bytes returns the output byte slice from the output buffer used if OutputFile is empty
wkhtmltopdf.go:224
↓ 8 callers
Method
findPath
findPath finds the path to wkhtmltopdf by - first looking in the current dir - looking in the PATH and PATHEXT environment dirs - using the WKHTMLTOPD
wkhtmltopdf.go:256
↓ 7 callers
Function
NewPage
NewPage creates a new input page from a local or web resource (filepath or URL)
wkhtmltopdf.go:69
↓ 7 callers
Method
WriteFile
WriteFile writes the contents of the output buffer to a file
wkhtmltopdf.go:242
↓ 7 callers
Function
newTestPDFGenerator
(tb testing.TB)
wkhtmltopdf_test.go:20
↓ 6 callers
Function
assertJSON
(t *testing.T, option, newOption interface{})
json_test.go:127
↓ 5 callers
Method
Buffer
Buffer returns the embedded output buffer used if OutputFile is empty
wkhtmltopdf.go:219
↓ 5 callers
Method
Reader
()
wkhtmltopdf.go:111
↓ 5 callers
Function
optionsHaveArg
(opts interface{}, arg string)
release_test.go:116
↓ 5 callers
Function
optsToArgs
(opts interface{})
options.go:440
↓ 4 callers
Method
Set
(s string)
wkhtmltopdf.go:29
↓ 4 callers
Method
ToJSON
ToJSON creates JSON of the complete representation of the PDFGenerator. It also saves all pages. For a PageReader page, the content is stored as a Bas
json.go:27
↓ 4 callers
Function
newPageOptions
()
options.go:354
↓ 3 callers
Function
GetPath
GetPath gets the path to wkhtmltopdf
wkhtmltopdf.go:43
↓ 3 callers
Function
NewPDFGeneratorFromJSON
NewPDFGeneratorFromJSON creates a new PDFGenerator and restores all the settings and pages from a JSON byte slice which should be created using PDFGen
json.go:60
↓ 3 callers
Function
NewPDFPreparer
NewPDFPreparer returns a PDFGenerator object without looking for the wkhtmltopdf executable file. This is useful to prepare a PDF file that is generat
wkhtmltopdf.go:390
↓ 3 callers
Method
Parse
()
options.go:164
↓ 3 callers
Method
Parse
()
options.go:187
↓ 3 callers
Method
Parse
()
options.go:242
↓ 3 callers
Method
Parse
()
options.go:267
↓ 3 callers
Method
Parse
()
options.go:291
↓ 3 callers
Method
Set
(value string)
options.go:199
↓ 3 callers
Function
expectedArgString
()
wkhtmltopdf_test.go:53
↓ 3 callers
Function
newHeaderAndFooterOptions
()
options.go:407
↓ 2 callers
Method
Args
Args returns the commandline arguments as a string slice
wkhtmltopdf.go:168
↓ 2 callers
Method
Get
()
wkhtmltopdf.go:23
↓ 2 callers
Method
InputFile
()
wkhtmltopdf.go:110
↓ 2 callers
Function
NewPageOptions
NewPageOptions returns a new PageOptions struct with all options
wkhtmltopdf.go:126
↓ 2 callers
Method
Parse
()
options.go:212
↓ 2 callers
Method
ResetPages
ResetPages drops all pages previously added by AddPage or SetPages. This allows reuse of current instance of PDFGenerator with all of it's configurati
wkhtmltopdf.go:214
↓ 2 callers
Function
SetPath
SetPath sets the path to wkhtmltopdf
wkhtmltopdf.go:38
↓ 2 callers
Method
SetStderr
SetStderr sets the output writer for Stderr when running the wkhtmltopdf command. You only need to call this when you want to print the output of wkht
wkhtmltopdf.go:237
↓ 2 callers
Function
newGlobalOptions
()
options.go:306
↓ 2 callers
Function
newOutlineOptions
()
options.go:345
↓ 2 callers
Function
newTocOptions
()
options.go:429
↓ 2 callers
Method
run
(ctx context.Context)
wkhtmltopdf.go:324
↓ 1 callers
Method
CreateContext
CreateContext is Create with a context passed to exec.CommandContext when calling wkhtmltopdf
wkhtmltopdf.go:320
↓ 1 callers
Method
Parse
()
options.go:156
↓ 1 callers
Method
Set
(value string)
options.go:174
↓ 1 callers
Method
Set
(value uint)
options.go:252
↓ 1 callers
Method
Set
(value float64)
options.go:277
↓ 1 callers
Method
Set
(value bool)
options.go:298
↓ 1 callers
Method
SetOutput
SetOutput sets the output to write the PDF to, when this method is called, the internal buffer will not be used, so the Bytes(), Buffer() and WriteFil
wkhtmltopdf.go:230
↓ 1 callers
Method
SetPages
SetPages resets all pages
wkhtmltopdf.go:208
↓ 1 callers
Method
Unset
()
options.go:178
↓ 1 callers
Method
Unset
()
options.go:203
↓ 1 callers
Method
Unset
()
options.go:232
↓ 1 callers
Method
Unset
()
options.go:257
↓ 1 callers
Method
Unset
()
options.go:282
↓ 1 callers
Method
Unset
()
options.go:302
↓ 1 callers
Method
checkDuplicateFlags
()
wkhtmltopdf.go:298
↓ 1 callers
Function
cmdConfig
(cmd *exec.Cmd)
cmdcfg.go:8
Method
Args
()
options.go:48
Method
Args
()
options.go:59
Method
Args
()
options.go:114
Method
Args
()
options.go:138
Method
Args
()
options.go:151
Method
Args
Args returns the argument slice and is part of the page interface
wkhtmltopdf.go:59
Method
Args
Args returns the argument slice and is part of the page interface
wkhtmltopdf.go:89
Method
Args
Args returns the argument slice
wkhtmltopdf.go:121
Function
BenchmarkArgs
(b *testing.B)
wkhtmltopdf_test.go:668
Function
ExampleNewPDFGenerator
()
simplesample_test.go:10
Function
ExampleNewPDFGeneratorFromJSON
()
simplesample_test.go:51
Method
InputFile
InputFile returns the input string and is part of the page interface
wkhtmltopdf.go:54
Method
InputFile
InputFile returns the input string and is part of the page interface
wkhtmltopdf.go:84
Method
MarshalJSON
()
json.go:105
Method
MarshalJSON
()
json.go:125
Method
MarshalJSON
()
json.go:146
Method
MarshalJSON
()
json.go:168
Method
MarshalJSON
()
json.go:189
Method
MarshalJSON
()
json.go:209
Method
Reader
Reader returns the io.Reader and is part of the page interface
wkhtmltopdf.go:64
Method
Reader
Reader returns the io.Reader and is part of the page interface
wkhtmltopdf.go:94
Function
TestArgString
(t *testing.T)
wkhtmltopdf_test.go:57
Function
TestBoolOption
(t *testing.T)
wkhtmltopdf_test.go:650
Function
TestBoolOption_JSON
(t *testing.T)
json_test.go:97
Function
TestBufferReset
(t *testing.T)
wkhtmltopdf_test.go:424
Function
TestContextCancellation
(t *testing.T)
wkhtmltopdf_test.go:130
Function
TestDuplicateOptions
(t *testing.T)
wkhtmltopdf_test.go:408
Function
TestFindPath
(t *testing.T)
wkhtmltopdf_test.go:460
Function
TestFloatOption
(t *testing.T)
wkhtmltopdf_test.go:632
Function
TestFloatOptionJSON
(t *testing.T)
json_test.go:102
Function
TestGeneratePDF
(t *testing.T)
wkhtmltopdf_test.go:119
Function
TestGeneratePdfFromStdinHtml5
(t *testing.T)
wkhtmltopdf_test.go:218
Function
TestGeneratePdfFromStdinSimple
(t *testing.T)
wkhtmltopdf_test.go:159
Function
TestIfArgsAreIncluded
TestIfArgsAreIncluded checks if all args in the help output of wkhtmltopdf are present in the code. If checks if the arguments are in any option set,
release_test.go:37
Function
TestMapOption
(t *testing.T)
wkhtmltopdf_test.go:588
Function
TestMapOption_JSON
(t *testing.T)
json_test.go:107
Function
TestNewPDFGeneratorFromJSON
(t *testing.T)
json_test.go:39
Function
TestNewPDFGeneratorFromJSONWithReader
(t *testing.T)
json_test.go:62
Function
TestNoInput
(t *testing.T)
wkhtmltopdf_test.go:102
Function
TestPDFGeneratorOutputFile
(t *testing.T)
wkhtmltopdf_test.go:184
Function
TestPDFGenerator_SetOutput
(t *testing.T)
wkhtmltopdf_test.go:273
next →
1–100 of 122, ranked by callers