From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/33001 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "'William Lupton' via pandoc-discuss" Newsgroups: gmane.text.pandoc Subject: Re: When passing the "footer-html" parameter to wkhtmltopdf, an error occurs: HostNotFoundError. Date: Fri, 28 Jul 2023 17:47:18 +0100 Message-ID: References: <6ddb5148-3ebd-4660-b66e-446173fb4e6an@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000001acf5506018ed602" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35512"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCS4HJ6WSAHBBJHCR6TAMGQEIETIIKY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Jul 28 18:47:39 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lj1-f185.google.com ([209.85.208.185]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1qPQcr-00090G-7r for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 28 Jul 2023 18:47:37 +0200 Original-Received: by mail-lj1-f185.google.com with SMTP id 38308e7fff4ca-2b9aa4db031sf21192321fa.3 for ; Fri, 28 Jul 2023 09:47:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690562856; cv=pass; d=google.com; s=arc-20160816; b=Q6Bi8KHhdZLT/r/giYnsginfgClH6muRqMf983OxpSmoWBxmQZNW5UcRVMLNKtv5ZX yvNvLg8qNk4e02Yo9msQG9ZaYJaCS9vuBJLz6c3sskMSb4XVeX9PS4PZsmEcxNk5w30c uoJRItH4OBTSlitRHzj33Yz9DjH9cjF7pCxuvTj94NKtKw7h710uBVoDFXUwFHaBdi0N J+F6ULpB/P05BFJAjGkzp166WolFJXC45/gqvmerKqCIXt7BCYe4weW1tjsDCH7VH2rW 49YNTLU6IPLl9OrnY0iFi5BWbrmDW1EDtRBbkbf9FJeQT+lR5kHrB3IlLbogATi6MWkl c8FA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date :from:in-reply-to:references:mime-version:dkim-signature; bh=21TeickbegIqyGuGYJaGTbCw0YdxEdUcBFWGGcaByH0=; fh=qJmsSccMvP84+2UNRX8q/vpYH8nRtRt8EIzTbS8P9qg=; b=nukKqrb25RggVvbq805zNdv/ju19OR+nuwNmXhqe27JzzYldHp9meQ4cq2D4OqwH4M SiGuAxq/CmMBv0lMUWPcZCyDBt8pV/sFExXemTLs6aXGxJIAy49hdv0dBmrjK0qyJjWr 7FTsoCP7Y/iNG1qBQq53st3I8jX16+yOeNpx7gn6jAuqv9ClJQhvqc+opJR/MiHcJzmT 08NJIdj9vlgNJReoBJXfSRwO4q6+Wqzzjxtp1HcVv4tYqpJ+A0K+XtVkh4H9NnP5JH1E hD1922YdObix5RtDh65pOspZx2A8h4TWZUK6N1Vu5P3cKuOa4e8hPoJR75YADW1Etca/ 39kA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@broadband-forum.org header.s=google header.b=VFOTYkz3; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2a00:1450:4864:20::529 as permitted sender) smtp.mailfrom=wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadband-forum.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1690562856; x=1691167656; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:to:subject :message-id:date:from:in-reply-to:references:mime-version:from:to:cc :subject:date:message-id:reply-to; bh=21TeickbegIqyGuGYJaGTbCw0YdxEdUcBFWGGcaByH0=; b=TyrKrnsYWvz4wc91mrRK3kmF92aarQ031sF9tzXuymIegbX8+uSq9Ewv2tJU6hSFt2 r/71aGRKbf497Yu+yvAoQPe+2mw3Av7QugpcUvIPBeXaFVikgUqDfmca/60CYrIvcXiU T0e1ZSkYOHlu6D4iggs9nj/c1CduncrHZ3XKFUUZwCuu/L8xQK76BDT/yM+B+45AU3MX jLkpEKb/uPKmpu31EI/5b99YwTSepiegjSn9k5707PQPProXymPCsHGWd/yQLAnoevf/ +Xt7CU3cgkdybWD4UCg9MbSsw9Uak1or2hH5/QulM01Vwp4UgBdMu/qvYF8NjTVIkksH cU X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690562856; x=1691167656; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:to:subject :message-id:date:from:in-reply-to:references:mime-version :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=21TeickbegIqyGuGYJaGTbCw0YdxEdUcBFWGGcaByH0=; b=kPYQ3vt4P3qIP+DNgU4OaQ/+xGD9LUTfT0YrN8tRmZGn76xaFVgdQBc9HP9ze4x5Te VLB+X/jb4wEnLpefveCqmCv094Qa2Hj41uLmDqjSYWJpjDjLHe+e6LrfM8rJADJnXWLm YAAORFTKjAn/NBLuxu4XBDyurAxr28z0Abv44+W5zWH7OaEcqY2jTz+bey28gIRgTEfK l0B5+h45ynrqJ9OELG0CfYMY2dPelsH3TmcuBWpvhH0Ffnd/HVLZRvWSMBv6uVAvP6MQ XVfpHqEm267Tc X-Gm-Message-State: ABy/qLbD7NMSK/gtuvc5lBGNwmNHj0wgPwHRWX4mgD/yt/89ZIROuoWr ubbssqIsxaCh6/5cFCyatr0= X-Google-Smtp-Source: APBJJlGZE+9vHdXst7S4qsncSgKCjyfkvjF4cDUNmbJToF0Y8rKjTNQ+hfUyJo/j1omrzMOhunEt+w== X-Received: by 2002:a2e:80d5:0:b0:2b7:857:7cb5 with SMTP id r21-20020a2e80d5000000b002b708577cb5mr2324740ljg.24.1690562855905; Fri, 28 Jul 2023 09:47:35 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a2e:a681:0:b0:2b9:5ebc:4afe with SMTP id q1-20020a2ea681000000b002b95ebc4afels285267lje.0.-pod-prod-09-eu; Fri, 28 Jul 2023 09:47:30 -0700 (PDT) X-Received: by 2002:a2e:8096:0:b0:2b9:35ae:c9ac with SMTP id i22-20020a2e8096000000b002b935aec9acmr2325692ljg.2.1690562850248; Fri, 28 Jul 2023 09:47:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690562850; cv=none; d=google.com; s=arc-20160816; b=yh3OTWRdI1LqSXF/kMeMuSekBGuE30x9yuwND8qI4dbNgpEGHZNx/yHSYIoTdSY5Nt G+mnKW9rn4YiTBFLx945g7+XzJW+oRraREeuCQky/rGRf07r5BqrHAzQdEHaRSBTrXXS RESUs1Gr59WxjMBzjvwlDm7W39rXxi/Bx3lBPaVX3NL7d78YEEa+/1Og6Ul2eNN801ob nQGtgvjgHWK2xcwGR2wK7XnTzPTMZr8S5zJxHgGe5tWym1qdoDmnWhzWkVBPlVCQNo1b Imp2NjtJtXSn0IUcGDY+6DbPRkG4TSzNC6GJ8WQD/JhL1Ac3qc91MAEBFB93Ga+Iybz9 pecQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=QsAgYdJlldXxgXyWKJ6qDwh421aU523D/ePwd85TGs8=; fh=JyGgpuKdcZS0s4/2AUuqQC96oyYQ9WoOW+YyK1eWgPc=; b=Yc2YoAmM4MmSsJuhHyq3VhKG1wEo24rOvhKT6bm95HGH7tBSJpgOfnsZblUeFQf9BG OC5dacnmrNlSi+xC/ONmPA4amq3KB6iwqG6Z+ztIMlgH9EvLqseddkZPDq/MxPvcALIl 9yXskHZjsOQjxfCT0XS9hMlD55V+qikwFDRtUxUqOxA4TvYwWGjBZOZjEjXTL1gEIVyz bl1vtgqinXJMS+e9yFwZu/u7SlU87dk0pnlxH819ptHXaGfzM1ed5zg+Owosv6gvy1c8 vF6v8ZqGTjNcFYwlsLvYVsD3Exultcuxb7aKKZKPSuFaTDm6Ca4anYaLGnoY5WaRcOD7 qlOw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@broadband-forum.org header.s=google header.b=VFOTYkz3; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2a00:1450:4864:20::529 as permitted sender) smtp.mailfrom=wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadband-forum.org Original-Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com. [2a00:1450:4864:20::529]) by gmr-mx.google.com with ESMTPS id a14-20020a2e980e000000b002b945894b21si309267ljj.6.2023.07.28.09.47.30 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 28 Jul 2023 09:47:30 -0700 (PDT) Received-SPF: pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2a00:1450:4864:20::529 as permitted sender) client-ip=2a00:1450:4864:20::529; Original-Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-51de9c2bc77so2953718a12.3 for ; Fri, 28 Jul 2023 09:47:30 -0700 (PDT) X-Received: by 2002:a17:906:11e:b0:99b:f4b2:6f13 with SMTP id 30-20020a170906011e00b0099bf4b26f13mr1233006eje.1.1690562849318; Fri, 28 Jul 2023 09:47:29 -0700 (PDT) In-Reply-To: <6ddb5148-3ebd-4660-b66e-446173fb4e6an-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@broadband-forum.org header.s=google header.b=VFOTYkz3; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2a00:1450:4864:20::529 as permitted sender) smtp.mailfrom=wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadband-forum.org X-Original-From: William Lupton Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:33001 Archived-At: --0000000000001acf5506018ed602 Content-Type: text/plain; charset="UTF-8" I think you need to separate this into two options (and you need the "--"), i.e., something like this: --pdf-engine-opt=--footer-html --pdf-engine-opt=footer.html I have got page numbers etc. working with wkhtmltopdf. See the extended help (-H) and look for "Footers And Headers". I modified the example JavaScript. However, I am looking to replace wkhtmltopdf with typst. More on this anon... On Fri, 28 Jul 2023 at 16:52, yujie zhang wrote: > I am using the PDF engine wkhtmltopdf to convert a given markdown file to > PDF. When I use --pdf-engine-opt to pass the parameter "footer-html" to > wkhtmltopdf, I always encounter the following error, regardless of whether > I include the --enable-local-file-access option or not: > [image: image] > > > My pandoc command line is as follows, and the input.md file, convert.css > file, header.html file, and footer.html file involved are all in the same > directory as pandoc.exe on the local machine. > pandoc --pdf-engine=wkhtmltopdf -s --css=convert.css -f markdown -t pdf > --pdf-engine-opt="--enable-local-file-access" > --include-in-header=header.html --variable=margin-top=0in > --variable=margin-bottom=0.333in --variable=margin-left=0in > --variable=margin-right=0in --dpi=200 input.md -o test.pdf > --pdf-engine-opt="footer-html footer.html" > *Pandoc version: *3.1.6 > > Also, does anyone know how to add a page number and footer to each > generated page of the PDF using the wkhtmltopdf engine? > > -- > You received this message because you are subscribed to the Google Groups > "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/6ddb5148-3ebd-4660-b66e-446173fb4e6an%40googlegroups.com > > . > -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxgG-5-kNWaBMWWd5X4Pa5wOY7MWpG2zpzMsO_h8k2gwog%40mail.gmail.com. --0000000000001acf5506018ed602 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I think you need to separate this into two options (and yo= u need the "--"), i.e., something like this:

-= -pdf-engine-opt=3D--footer-html --pdf-engine-opt=3Dfooter.html

I have got page numbers etc. working with=C2=A0wkhtmltopdf= . See the extended help (-H) and look for "Footers And Headers". = I modified the example JavaScript.

However, I am l= ooking to replace wkhtmltopdf with typst. More on this anon...
<= br>
On Fri,= 28 Jul 2023 at 16:52, yujie zhang <yujiezhang017-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

I am using the PDF engine wkhtmltopdf to convert a given markdown file = to PDF. When I use --pdf-engine-opt to pass the parameter "footer-html= " to wkhtmltopdf, I always encounter the following error, regardless o= f whether I include the --enable-local-file-access option or not:
3D"image=

My pandoc command line is as follows, an= d the input.md file, convert.css file, header.html file, and footer.html fi= le involved are all in the same directory as pandoc.exe on the local machin= e.
pandoc --pdf-engine=3Dwkhtmltopdf -s --css= =3Dconvert.css -f markdown -t pdf --pdf-engine-opt=3D"--enable-local-f= ile-access" --include-in-header=3Dheader.html --variable=3Dmargin-top= =3D0in --variable=3Dmargin-bottom=3D0.333in --variable=3Dmargin-left=3D0in = --variable=3Dmargin-right=3D0in --dpi=3D200 input.md -o test.pdf --pdf-engi= ne-opt=3D"footer-html footer.html"
Pandoc version:=C2=A03.1.6


Also, does anyone know h= ow to add a page number and footer to each generated page of the PDF using = the wkhtmltopdf engine?

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https= ://groups.google.com/d/msgid/pandoc-discuss/6ddb5148-3ebd-4660-b66e-446173f= b4e6an%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.= google.com/d/msgid/pandoc-discuss/CAEe_xxgG-5-kNWaBMWWd5X4Pa5wOY7MWpG2zpzMs= O_h8k2gwog%40mail.gmail.com.
--0000000000001acf5506018ed602--