From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/33077 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: BPJ Newsgroups: gmane.text.pandoc Subject: Re: HTML to PDF with print media Date: Sun, 27 Aug 2023 10:54:43 +0200 Message-ID: References: <8fbe5ece-caa7-428c-a940-01c49ef8709dn@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000000bb2550603e3bb0e" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27974"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCWMVYEK54FRBXE6VSTQMGQEZE23GBY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sun Aug 27 10:54:56 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-qv1-f55.google.com ([209.85.219.55]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1qaBXr-00073M-KZ for gtp-pandoc-discuss@m.gmane-mx.org; Sun, 27 Aug 2023 10:54:55 +0200 Original-Received: by mail-qv1-f55.google.com with SMTP id 6a1803df08f44-63d1695e445sf30971756d6.2 for ; Sun, 27 Aug 2023 01:54:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1693126494; cv=pass; d=google.com; s=arc-20160816; b=O7gQEhjaQ5PP0+/Abecdv/a8p+LvfG/Bls9mcBlYRpxBaZCANC5we7wI0q4Id75ZwC 3vrAjg+p3t80zamYHBnp+GiRmV4eScAM0DxfDFG2V3pGhELCwfBDRNom6bjF7OXCzYZ6 e+rA42wnrn8mnhbW1qBh0HFtu47iQHHuyfgRnmcqPddQ9BdcTO6jZaHi49Iupi4cVWnX UteIVZU+efUG+2YpDqGOYz+L4RCcxVXIAWIS2qdkFxLMPVYNjI1UM39Fcxi1L63Zhddp o2KPYBhWfrdiSYsqU3c99cVIDeb4G0fJodAsLEvflU/JcSOaogiOYRcXwEbigagURY1x 5BQg== 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:sender:dkim-signature :dkim-signature; bh=YxUsagsE/70ezWBVI1jsxsvYfTR3eI4d0GuVrYlSPs8=; fh=7hVwPa9wYt5eiBYfSHHLDYQlAmXCnXdxB8L+IfejXog=; b=GntHMVqsnc1jhfSmVaFQkQuLPzzDnORATYtEcz18DsEPY3y0GVdgR/KPvKhaCHvCN1 6KP70gQNiF5/hnlrUZqpdJjRkJw7VZG0dhpf6wIfsbnvBl00pRK7MtUMKIDWoi4XVIkx ihDoXVnV9ikLtjskPAjmY2F+gGfr62YnMHwZ6Vfst3d/ZZoMi5XoUmsHaR/uaZQvCHWa DV6oiIQn0TcJDABKfSuVUbePtwCt0xA0wTaRm16omviolEi9FQVQedu+KMzs/3iJDKrn lEEstF4NGM6WuBMA4ISc3aLT5mJuOYOVACQ02oMtByuSpaP1MrHnKLSmTK/IhnDUz3wO WUpQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="a+J9I0/Y"; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::b32 as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1693126494; x=1693731294; 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:sender :from:to:cc:subject:date:message-id:reply-to; bh=YxUsagsE/70ezWBVI1jsxsvYfTR3eI4d0GuVrYlSPs8=; b=LC+hRt8Cg88XsS4sthEHm8tNCGvapvWoqpaU3jEtLnRghUFETsvxsyI1cUAgmPM/SX V73WioNDlVhjPPbVRWoqOGYXmOv2fZh514K4vQZNg9BNlm065Rd+wi/tKeUG/FtuboPr 2j6xgDWLuBPDmp0LPQVEeH/ubo6RlR0wof6s7p951juZzQvBnxOLQRllo6STCyqp3zE/ 2qRvtRqcjlSrBjKxfsEoZ8KAOkTweh9WkWioeOB980K+4UUiAlpK6Q9vlCAc+MEjJtI3 sYcOx7jZqZRWcbIC1kPcCnVYQyeI/4Fz/2sqjGg46OV7m7+zBUOeQCKW4tFaw8t6W6HE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693126494; x=1693731294; 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=YxUsagsE/70ezWBVI1jsxsvYfTR3eI4d0GuVrYlSPs8=; b=hDz0XBslhqrK/jeSpmgxvBmLxaCwSTp+fFb078zyuA2PGITnRUO69FjTqvDgTKe+nb jyhL4YMcWnJml6Nrewl38NjpeqbEkuOkLnnwBkbF6hIpwPlALXktYjjnl05yCJH9riFA tSJmb1NfK8NgSfzkPqz2xQ2Hop/rClYqgrt8GbsqbwFLZhxVLZjfxcqKJHkHJrwZiI9r +472a4G+igBnd46oE4UMq7NH/rTQQZ/Ebt5c3zOy4y/fepzdA8E4Bo1KFgS3UwpYxtph Cgxfm7wTpT1lFHQNYgCwmwjXVnjb5ptLHPJ8omAoYGWvvxjOnuDueILnoej9m58VD6F8 N9lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693126494; x=1693731294; 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:sender:from:to:cc:subject:date :message-id:reply-to; bh=YxUsagsE/70ezWBVI1jsxsvYfTR3eI4d0GuVrYlSPs8=; b=N7TFT6kMqnr6hGZ3vzbcR4+F3u5FgkLqiz1IS8njEWB08JubXCALF8XabzLwDcrPPL merxYz7Iw30xN6jcejgjREaVSMQg984N9spbxc5ly5MXw0i0FQ7jyHoSb/GuxwsxYavS zLVS7R2IxDY+lnRJKGbfCS4ndboJArrP1YvMCw4lREfVu0cZzVHPqM7hkjOAY1DfvwR4 WA2DY65JbhuzHm+oHBkc+DPt+yK1vgGxgzEplgnPEn91gggmndEj9JIzuN9nccD8k9MC LWqWHf Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOJu0YxMU5dGQoGHIHsUi7hD6l6ffHbILz4VO6jEZ8tMJly8mC+Vt12V AaabgKQfqVf81bRAcSkrs5E= X-Google-Smtp-Source: AGHT+IHHQne9EuyDdN1q6a+DboqvrrWtbw/DNk1z2pIOjG78dmHFLoyYHC5W7YENUTZYxmdcja+Gmg== X-Received: by 2002:a0c:cb10:0:b0:64f:5a79:cde5 with SMTP id o16-20020a0ccb10000000b0064f5a79cde5mr11897923qvk.18.1693126494592; Sun, 27 Aug 2023 01:54:54 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a0c:e0cd:0:b0:649:bc7:cfe4 with SMTP id x13-20020a0ce0cd000000b006490bc7cfe4ls2493024qvk.0.-pod-prod-04-us; Sun, 27 Aug 2023 01:54:51 -0700 (PDT) X-Received: by 2002:a0c:f3c3:0:b0:64a:a5f8:6314 with SMTP id f3-20020a0cf3c3000000b0064aa5f86314mr1290334qvm.0.1693126491325; Sun, 27 Aug 2023 01:54:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693126491; cv=none; d=google.com; s=arc-20160816; b=QgjhuI02vJto/id/XwfYl2aFfAqBFXMKZtT/j4Ojcn+p5a4NsEvuhN4NRNDsVhrBF7 JbooWl6H3zRegXxNjv1HjqC3vFWqXF4FfhsM6jpLkZOyb6EDvS4E9+F14Q48DxjsoRgB EhZKsFoDUFu3IT4LPYgYUdB4g75s/b4BxVOnnDy+edpypHwclpAIu7ptluX3phjCBSU5 N9mf4nSvabwVUt8RBn1XO+Jr/tuQ7YrTCNqy6qp3dUutLPIA0kcN9+AofRCPC5I0pqgv BFDmDkzth0JYgw4ltclQxRa1D5KCIrXJDfgwfWk2Z9pG1c7wmP+Omo3ls6UEZ4jh6NZP 2dhw== 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=8gG50FDjoAB1gmajgpS+mLI/LfWsKA7aszI+GDEuyUg=; fh=4cPfTtzleA5nPUC1EQtk197aIUeaT1ew1v/oILbLT2I=; b=BRc/E1x5TToNnPTn7hUm069XWLWOy6hGuW99eAQLWrS9vFqTbdMTACJb65ewXrnVm9 eyXM5I7chLcJ9JmQ60IuksWRhPt+BEtT7firTeH/tAkT03ytmUR0AMPcWtJTKKaDC4sl LDr7cdF0J7DLOy7CYJpKwoPc4aV8RXTEBjduZNsW9ZZKI+Jg7g58PrwJM8y0/wlAO4Sl CXW/NSSulWQEtYiBaaeNCxP6qV9aTdHpAXc6Tfm10bJzBQK54j92XZEpc81anO62/PZz fnqjGXNZb3XfUTaQZbhTYGbvBHT4DCqZVQL9edVklG7Mqft0ubwVwdQwLlyM/rPqhGH9 01uQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="a+J9I0/Y"; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::b32 as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-yb1-xb32.google.com (mail-yb1-xb32.google.com. [2607:f8b0:4864:20::b32]) by gmr-mx.google.com with ESMTPS id a9-20020ad441c9000000b0064937e1f933si598010qvq.8.2023.08.27.01.54.51 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Aug 2023 01:54:51 -0700 (PDT) Received-SPF: pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::b32 as permitted sender) client-ip=2607:f8b0:4864:20::b32; Original-Received: by mail-yb1-xb32.google.com with SMTP id 3f1490d57ef6-d77b9d574f8so2083908276.2 for ; Sun, 27 Aug 2023 01:54:51 -0700 (PDT) X-Received: by 2002:a25:c547:0:b0:d77:f518:ff59 with SMTP id v68-20020a25c547000000b00d77f518ff59mr9586742ybe.11.1693126490827; Sun, 27 Aug 2023 01:54:50 -0700 (PDT) In-Reply-To: <8fbe5ece-caa7-428c-a940-01c49ef8709dn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="a+J9I0/Y"; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::b32 as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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:33077 Archived-At: --0000000000000bb2550603e3bb0e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable This seems to be a problem with the program used for HTML-to-PDF conversion (by default wkhtmltopdf I believe) so you will have to take it up with them as it isn't properly a Pandoc problem. Development on wkhtmltopdf has AFAIK stopped, so I would advise you to first try another HTML-to-PDF engine first, e.g. weasyprint, and if you still have problems take it up via their channels. It is possible that you will be better off first producing an HTML document with Pandoc then invoke the HTML-to-PDF engine separately, passing it your HTML, your CSS and whatever other options or configuration which may be needed. Please refer to https://pandoc.org/MANUAL.html#creating-a-pdf https://pandoc.org/MANUAL.html#option--pdf-engine https://print-css.rocks/ Den l=C3=B6r 26 aug. 2023 01:12'Vivianne' via pandoc-discuss < pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> skrev: > Hi, > I'm trying to convert HTML to PDF in the exact same manor that pressing > ctrl+p in a browser would. The CSS has @media print stuff that gives the > browser instructions on how to render the page. When I go > > pandoc zine.html zine.pdf > > pandoc ignores the @media print and spits out a very tall column over > several pages. > > How do I get the same behavior as a browser? > > -- > 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/8fbe5ece-caa7-428c-a940-= 01c49ef8709dn%40googlegroups.com > > . > --=20 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 e= mail 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/CADAJKhDduUEyFO%3DgkdZCKTeGDUqoCpWe-44Ec7JRg9v-1Wd7AA%40mail= .gmail.com. --0000000000000bb2550603e3bb0e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
This seems to be a problem with the program used for HTML= -to-PDF conversion (by default wkhtmltopdf I believe) so you will have to t= ake it up with them as it isn't properly a Pandoc problem.

Development on wkhtmltopdf has AFAIK stopp= ed, so I would advise you to first try another HTML-to-PDF engine first, e.= g. weasyprint, and if you still have problems take it up via their channels= . It is possible that you will be better off first producing an HTML docume= nt with Pandoc then invoke the HTML-to-PDF engine separately, passing it yo= ur HTML, your CSS and whatever other options or configuration which may be = needed.


Den l=C3=B6r 26 aug. 2023 01:12'Vivianne' via pandoc-disc= uss <pandoc-discuss@g= ooglegroups.com> skrev:
Hi,
I'm trying to convert HTML to PDF in the exact same= manor that pressing ctrl+p in a browser would. The CSS has @media print st= uff that gives the browser instructions on how to render the page. When I g= o

pandoc zine.html zine.pdf

pandoc ignores the @media print and spits out a very tall column ov= er several pages.

How do I get the same behav= ior as a browser?

--
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-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.org= m.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/8fbe5ece-c= aa7-428c-a940-01c49ef8709dn%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://group= s.google.com/d/msgid/pandoc-discuss/CADAJKhDduUEyFO%3DgkdZCKTeGDUqoCpWe-44E= c7JRg9v-1Wd7AA%40mail.gmail.com.
--0000000000000bb2550603e3bb0e--