From: Robert Fekete <fekete77.robert-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Copy-pasting code from the PDF loses formatting
Date: Thu, 6 Jan 2022 01:10:33 -0800 (PST) [thread overview]
Message-ID: <a976bf18-7019-43cf-84c2-0a2d375cef55n@googlegroups.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1296 bytes --]
Hi Everyone,
I'm trying to create PDF output from HTML input, and ran into a weird error:
Code samples (for example, YAML or Python) are properly formatted in the
pdf, but most of the formatting is lost when copy-pasting the code from the
PDF into a text editor or terminal. Depending on the PDF viewer, either:
- line breaks are retained, but indentation is lost (evince, preview,
adobe reader), or
- line breaks are lost and everything becomes a single line, but
whitespace is retained (built-in pdf viewer of Firefox and VS Code)
I'm currently using pandoc 2.14.2 on MacOS Big Sur.
I have attached two test files (input and output), I created the pdf with
the wkhtml2pdf engine, but I've tested other engines as well and the
results were similar (xelatex, weasyprint).
Has anyone seen a similar problem? Any pointers are appreciated.
Kind Regards,
Robert
--
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/a976bf18-7019-43cf-84c2-0a2d375cef55n%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 1781 bytes --]
[-- Attachment #2: test-2.html --]
[-- Type: text/html, Size: 2769 bytes --]
[-- Attachment #3: test-2.pdf --]
[-- Type: application/pdf, Size: 26120 bytes --]
next reply other threads:[~2022-01-06 9:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-06 9:10 Robert Fekete [this message]
[not found] ` <a976bf18-7019-43cf-84c2-0a2d375cef55n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-01-06 13:59 ` Leonard Rosenthol
2022-01-06 14:50 ` Robert Fekete
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a976bf18-7019-43cf-84c2-0a2d375cef55n@googlegroups.com \
--to=fekete77.robert-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).