fix export pdf error
This commit is contained in:
@ -444,9 +444,9 @@ func (c Note) ExportPdf(noteId string) revel.Result {
|
|||||||
// wkhtmltopdf参数大全
|
// wkhtmltopdf参数大全
|
||||||
var cc string
|
var cc string
|
||||||
if note.IsMarkdown {
|
if note.IsMarkdown {
|
||||||
cc = binPath + " --lowquality --window-status done \"" + url + "\" \"" + path + "\"" // \"" + cookieDomain + "\" \"" + cookieName + "\" \"" + cookieValue + "\""
|
cc = binPath + " --ignore-load-errors --lowquality --window-status done \"" + url + "\" \"" + path + "\"" // \"" + cookieDomain + "\" \"" + cookieName + "\" \"" + cookieValue + "\""
|
||||||
} else {
|
} else {
|
||||||
cc = binPath + " --lowquality \"" + url + "\" \"" + path + "\"" // \"" + cookieDomain + "\" \"" + cookieName + "\" \"" + cookieValue + "\""
|
cc = binPath + " --ignore-load-errors --lowquality \"" + url + "\" \"" + path + "\"" // \"" + cookieDomain + "\" \"" + cookieName + "\" \"" + cookieValue + "\""
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd := exec.Command("/bin/sh", "-c", cc)
|
cmd := exec.Command("/bin/sh", "-c", cc)
|
||||||
|
@ -590,9 +590,9 @@ func (c ApiNote) ExportPdf(noteId string) revel.Result {
|
|||||||
url := configService.GetSiteUrl() + "/note/toPdf?noteId=" + noteId + "&appKey=" + appKey
|
url := configService.GetSiteUrl() + "/note/toPdf?noteId=" + noteId + "&appKey=" + appKey
|
||||||
var cc string
|
var cc string
|
||||||
if note.IsMarkdown {
|
if note.IsMarkdown {
|
||||||
cc = binPath + " --lowquality --window-status done \"" + url + "\" \"" + path + "\"" // \"" + cookieDomain + "\" \"" + cookieName + "\" \"" + cookieValue + "\""
|
cc = binPath + " --ignore-load-errors --lowquality --window-status done \"" + url + "\" \"" + path + "\"" // \"" + cookieDomain + "\" \"" + cookieName + "\" \"" + cookieValue + "\""
|
||||||
} else {
|
} else {
|
||||||
cc = binPath + " --lowquality \"" + url + "\" \"" + path + "\"" // \"" + cookieDomain + "\" \"" + cookieName + "\" \"" + cookieValue + "\""
|
cc = binPath + " --ignore-load-errors --lowquality \"" + url + "\" \"" + path + "\"" // \"" + cookieDomain + "\" \"" + cookieName + "\" \"" + cookieValue + "\""
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd := exec.Command("/bin/sh", "-c", cc)
|
cmd := exec.Command("/bin/sh", "-c", cc)
|
||||||
|
@ -90,8 +90,8 @@ table tr:nth-child(2n) {
|
|||||||
|
|
||||||
<script src="{{.siteUrl}}/js/jquery-1.9.0.min.js"></script>
|
<script src="{{.siteUrl}}/js/jquery-1.9.0.min.js"></script>
|
||||||
|
|
||||||
<link href="{{.siteUrl}}/public/mdeditor/editor/google-code-prettify/prettify.css" type="text/css" rel="stylesheet">
|
<link href="{{.siteUrl}}/public/js/google-code-prettify/prettify.css" type="text/css" rel="stylesheet">
|
||||||
<script src="{{.siteUrl}}/public/mdeditor/editor/google-code-prettify/prettify.js"></script>
|
<script src="{{.siteUrl}}/public/js/google-code-prettify/prettify.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function ok() {
|
function ok() {
|
||||||
|
Reference in New Issue
Block a user