html 转成pdf 在线,Web - html 转 pdf 在线生成 api,最强网站

Optional PDF Parameters (See here for image thumbnail parameters)

MarginLeft

Value of left margin - default is 0

MarginRight

Value of right margin - default is 0

MarginTop

Value of top margin - default is 0

MarginBottom

Value of bottom margin - default is 0

UseGrayscale

true to generate PDF in grayscale, false or leave blank for full colour

UseLandscape

true to rotate page to landscape, false or leave blank for portrait

EnableForms

true to turn html form fields into pdf form fields

LowQuality

true to reduce the quality, which may lower your network usage if quality is still satisfactory

ImageQuality

override the default image quality percentage (94) and use your own

DisableShrinking

true to disable the intelligent shrinking process we use make the pixel/dpi ratio constant

DisableJavascript

true to disable running JS on page, otherwise javascript runs

JavascriptDelay

Milliseconds to wait for JS to finish executing before converting the page. Useful for ajax calls.

UsePrintStylesheet

true to use the print media stylesheet, false or leave blank to use normal stylesheet

FooterSpacing

Spacing between the header and the content in mm - default is 0

HeaderSpacing

Spacing between the footer and the content in mm - default is 0

PageSize

Default size is A4 but you can use Letter, A0, A2, A3, A5, Legal, etc.

PageWidth

Page width - if you use this, you must also use PageWidth

PageHeight

Page height - if you use this, you must also use PageHeight

ViewPort

e.g. 800x600 - Set if you have custom scrollbars or css attribute overflow to emulate window size

Dpi

Explicitly set the DPI, which is 96 by default. Also see Zoom settings

Zoom

Default zoom is 1.00 You can use any floating point number, e.g. 0.5, 0.75, 1.10, 2.55, 3...

OutputFormat

Must be either "pdf", "jpg", "png", "bmp" or "svg" if not supplied the default is PDF

FileName

Optionally the name you want the file to be called when downloading or $unique$ for guid

Username

For URL conversions, creates a secure basic authentication connection to your server

Password

For URL conversions, creates a secure basic authentication connection to your server

Cookie

Supply in format: NAME|||VALUE|||NAME|||VALUE (that's 2 cookies). Often used for authentication.

Headers and footers, including automatic page numbering can be done by either passing in a url to HeaderUrl/HeaderHtml or FooterUrl/FooterHtml, or passing in a small snippet of plain text to HeaderLeft, HeaderRight, FooterLeft or FooterRight. Note that if you want to use a header or footer, you must also use a margin parameter like MarginTop or MarginBottom to ensure there is space for the header or footer. Your Html should also start with and include the and

tags

HeaderHtml

To use an html header on each page - a string starting with

FooterHtml

To use an html footer on each page - a string starting with

HeaderUrl

To use an html header on each page - a url starting with http containing the html

FooterUrl

To use an html footer on each page - a url starting with http containing the html

HeaderLeft

Top left header text (can use replacement tags below)

HeaderRight

Top right header text (can use replacement tags below)

FooterLeft

Bottom left footer (can use replacement tags below)

FooterRight

Bottom right footer (can use replacement tags below)

FooterFontName

Footer font names - Arial by default

HeaderFontName

Header font names - Arial by default

FooterFontSize

The font sizes - 12 by default. Use the the plain value (do not use px or pt)

HeaderFontSize

The font sizes - 12 by default. Use the the plain value (do not use px or pt)

The replacement tags in the following table can be used to set the page numbering. For example, using FooterRight with a value of 'Page [page] of [toPage]', and remembering to also use a margin per above, e.g. MarginBottom with a value of 20

[page]

Tag replaced with number of the pages currently being printed

[frompage]

Tag replaced with the number of the first page to be printedr

[topage]

Tag replaced with the number of the last page to be printed

[section]

Tag replaced with the name of the current section

Let us know if you need extra parameters or other API features

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值