使用playwright将文件快速转换成pdf格式

1. 安装

Conda安装:

conda config --add channels conda-forge
conda config --add channels microsoft
conda install playwright
playwright install

Pip安装:

# 安装playwright
pip install playwright
# 安装browser驱动
playwright install

2. 利用playwright 将page保存为pdf格式的用法

playwright pdf  file://"file_path" filename.pdf

简单快捷有效-.-


版权声明:本文为qq_43192617原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。