Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ http://127.0.0.1:8080/convert/html2pdf?u=doctron&p=lampnick&url=<url>&marginTop=
- marginRight // Right margin in inches. core.Defaults to 1cm (~0.4 inches).
- pageRanges // Paper ranges to print, e.g., '1-5, 8, 11-13'. core.Defaults to the empty string, which means print all pages.
- ignoreInvalidPageRanges // Whether to silently ignore invalid but successfully parsed page ranges, such as '3-2'. core.Defaults to false.
- WaitingTime // Waiting time after the page loaded. Default 0 means not wait. unit:Millisecond
- headerTemplate // HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them: - date: formatted print date - title: document title - url: document location - pageNumber: current page number - totalPages: total pages in the document For example, <span class=title></span> would generate span containing the title.
- footerTemplate // HTML template for the print footer. Should use the same format as the headerTemplate.
- preferCSSPageSize // Whether or not to prefer page size as defined by css. core.Defaults to false, in which case the content will be scaled to fit the paper size. (Generally, it can solve the problem that the single page converted to PDF will be inconsistent with the specified size)
- WaitingTime // Waiting time after the page loaded. Default 0 means not wait. unit:Millisecond

### Html convert to image
###### basic
Expand Down
3 changes: 3 additions & 0 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ http://127.0.0.1:8080/convert/html2pdf?u=doctron&p=lampnick&url=<url>&marginTop=
- marginRight // 右外边距,单位英尺。默认纸0.4英尺(1厘米).
- pageRanges // 需要打印的PDF的页数。默认为空字符串,表示所有页面.
- ignoreInvalidPageRanges // 是否静默的忽略掉不可用的但是成功解析的页面。例如'3-2',默认false.
- headerTemplate // 打印标题的 HTML 模板。 应该是有效的 HTML 标记,具有以下类,用于将打印值注入其中: - 日期:格式化的打印日期 - 标题:文档标题 - url:文档位置 - pageNumber:当前页码 -totalPages:文档中的总页数 例如,< span class=title></span> 将生成包含标题的 span。
- footerTemplate // 打印页脚的 HTML 模板。 应使用与 headerTemplate 相同的格式。
- preferCSSPageSize // 是否首选 css 定义的页面大小。 core.默认为 false,在这种情况下,内容将缩放以适合纸张大小。 (一般可以解决 单页转pdf会和指定大小不一致的情况)
- WaitingTime // 页面加载后等待时长. 默认为0代表不等待. 单位:毫秒

### Html转图片
Expand Down