pdf

package
v1.14.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

基于 github.com/chromedp/chromedp;需要确保本地有 chromium 内核可以使用

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintToPDFWithHTML

func PrintToPDFWithHTML(ctx context.Context, html string, actions ...chromedp.Action) (data []byte, err error)

PrintToPDFWithHTML 根据提供的 html 内容,生成 pdf

actions 在生成 PDF 前的等待动作,比如, chromedp.WaitVisible("#render_done")

func PrintToPDFWithURL

func PrintToPDFWithURL(ctx context.Context, url string, actions ...chromedp.Action) (data []byte, err error)

PrintToPDFWithHTML 根据提供的 url,生成 pdf

actions 在生成 PDF 前的等待动作,比如, chromedp.WaitVisible("#render_done")

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL