单/多网页生成PDF(不压缩)

接口描述:

指定服务端对param参数中的网页地址生成PDF,并返回文件流

接口地址:

请求方式:

  • GET

请求参数:

参数名称 参数说明 请求类型 是否必须 数据类型 schema
selector 元素选择器,指定筛选截图区域的元素选择器,默认:.growthMain query false string
pageSize 生成PDF页面大小,默认:A4 query false string
param 需要生成PDF的网页地址 Base64 query false string
  • 地址示例:
http://192.168.3.100:30813/wkhtmltopdf2?quality=100&param=eyJyZXBvcnRfdXJscyI6WyJodHRwOi8vMTkyLjE2OC4zLjEwMDozMTI1MS9ncm93dGhQcmludC9zaG93cGFnZS5odG1sP3NjaG9vbENvZGU9MTU0NCZncmFkZUNvZGU9MjEmY2xhc3NDb2RlPTIwMjIxNTQ0MTA3MDEmdGVtcGxhdGVJZD0xNjY2MzE4OTczODI0MDI4NjczJnN0dUlkPTMxOTA4MDcxMzI3NDYwNjcmcGFnZUlkPTE2NjYzMTg5NzYxMTQxMTg2NTYiLCJodHRwOi8vMTkyLjE2OC4zLjEwMDozMTI1MS9ncm93dGhQcmludC9zaG93cGFnZS5odG1sP3NjaG9vbENvZGU9MTU0NCZncmFkZUNvZGU9MjEmY2xhc3NDb2RlPTIwMjIxNTQ0MTA3MDEmdGVtcGxhdGVJZD0xNjY2MzE4OTczODI0MDI4NjczJnN0dUlkPTMxOTA4MDcxMzI3NDYwNjcmcGFnZUlkPTE2NjYzMTg5NzYxMTQxMTg2NTciLCJodHRwOi8vMTkyLjE2OC4zLjEwMDozMTI1MS9ncm93dGhQcmludC9zaG93cGFnZS5odG1sP3NjaG9vbENvZGU9MTU0NCZncmFkZUNvZGU9MjEmY2xhc3NDb2RlPTIwMjIxNTQ0MTA3MDEmdGVtcGxhdGVJZD0xNjY2MzE4OTczODI0MDI4NjczJnN0dUlkPTMxOTA4MDcxMzI3NDYwNjcmcGFnZUlkPTE2NjYzMTg5NzYxMTQxMTg2NTgiLCJodHRwOi8vMTkyLjE2OC4zLjEwMDozMTI1MS9ncm93dGhQcmludC9zaG93cG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TIwMjIxNTQ0MTA3MDEmdGVtcGxhdGVJZD0xNjY2MzE4OTczODI0MDI4NjczJnN0dUlkPTMxOTA4MDcxMzI3NDYwNjcmcGFnZUlkPTE2NjYzMTg5NzYxMTgzMTI5NjIiLCJodHRwOi8vMTkyLjE2OC4zLjEwMDozMTI1MS9ncm93dGhQcmludC9zaG93cGFnZS5odG1sP3NjaG9vbENvZGU9MTU0NCZncmFkZUNvZGU9MjEmY2xhc3NDb2RlPTIwMjIxNTQ0MTA3MDEmdGVtcGxhdGVJZD0xNjY2MzE4OTczODI0MDI4NjczJnN0dUlkPTMxOTA4MDcxMzI3NDYwNjcmcGFnZUlkPTE2NjYzMTg5NzYxMTgzMTI5NjMiLCJodHRwOi8vMTkyLjE2OC4zLjEwMDozMTI1MS9ncm93dGhQcmludC9zaG93cGFnZS5odG1sP3NjaG9vbENvZGU9MTU0NCZncmFkZUNvZGU9MjEmY2xhc3NDb2RlPTIwMjIxNTQ0MTA3MDEmdGVtcGxhdGVJZD0xNjY2MzE4OTczODI0MDI4NjczJnN0dUlkPTMxOTA4MDcxMzI3NDYwNjcmcGFnZUlkPTE2NjYzMTg5NzYxMTgzMTI5NjQiXX0=
  • param 进行 base64 解码后:
{"report_urls":["http://192.168.3.100:31251/growthPrint/showpage.html?schoolCode=1544&gradeCode=21&classCode=2022154410701&templateId=1666318973824028673&stuId=3190807132746067&pageId=1666318976114118656","http://192.168.3.100:31251/growthPrint/showpage.html?schoolCode=1544&gradeCode=21&classCode=2022154410701&templateId=1666318973824028673&stuId=3190807132746067&pageId=1666318976114118657","http://192.168.3.100:31251/growthPrint/showpage.html?schoolCode=1544&gradeCode=21&classCode=2022154410701&templateId=1666318973824028673&stuId=3190807132746067&pageId=1666318976114118658","http://192.168.3.100:31251/growthPrint/showpage.html?schoolCode=1544&gradeCode=21&classCode=2022154410701&templateId=1666318973824028673&stuId=3190807132746067&pageId=1666318976114118659","http://192.168.3.100:31251/growthPrint/showpage.html?schoolCode=1544&gradeCode=21&classCode=2022154410701&templateId=1666318973824028673&stuId=3190807132746067&pageId=1666318976114118660","http://192.168.3.100:31251/growthPrint/showpage.html?schoolCode=1544&gradeCode=21&classCode=2022154410701&templateId=1666318973824028673&stuId=3190807132746067&pageId=1666318976118312960","http://192.168.3.100:31251/growthPrint/showpage.html?schoolCode=1544&gradeCode=21&classCode=2022154410701&templateId=1666318973824028673&stuId=3190807132746067&pageId=1666318976118312961","http://192.168.3.100:31251/growthPrint/showpage.html?schoolCode=1544&gradeCode=21&classCode=2022154410701&templateId=1666318973824028673&stuId=3190807132746067&pageId=1666318976118312962","http://192.168.3.100:31251/growthPrint/showpage.html?schoolCode=1544&gradeCode=21&classCode=2022154410701&templateId=1666318973824028673&stuId=3190807132746067&pageId=1666318976118312963","http://192.168.3.100:31251/growthPrint/showpage.html?schoolCode=1544&gradeCode=21&classCode=2022154410701&templateId=1666318973824028673&stuId=3190807132746067&pageId=1666318976118312964"]}
  • Base64 编码/解码

https://c.runoob.com/front-end/693/

作者:Jeebiz  创建时间:2023-06-09 12:11
最后编辑:Jeebiz  更新时间:2024-03-22 19:10