Ask Your Question
0

line break on pdf export

asked 2016-03-04 06:48:07 +0200

minttux gravatar image

updated 2016-03-04 08:37:26 +0200

I have some code block that i put in my document like:

# openssl req -x509 -nodes -days 7300 -newkey rsa:2048 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem

And it's on one line when i put in text editor: image description

Then i paste in my doc in libreoffice: image description

Now i export my file to pdf and select it from pdf: image description

When i paste it in texteditor it's two line so my command broke and doesn't work anymore: image description

Also i habe these lines in libreoffice: image description

But in pdf export broke and select like this in two section: image description

So when i paste somewhere from pdf it looks like: image description

edit retag flag offensive close merge delete

Comments

Why not attach the real examples: odt and pdf files?

Lupp gravatar imageLupp ( 2016-03-04 13:09:25 +0200 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2016-03-04 13:09:11 +0200

Lupp gravatar image

updated 2016-03-04 14:03:48 +0200

Editing: Refer Owen's comment. I am by far not as experienced as he is concerning different systems and tools.

You used a HT to separate the rest of the line from the "#" character?
In this case I also got shown two "separated portions" when copying from the pdf.
Nonetheless I could not verify your observations with:
LibreOffice V 5.1.0.3 (64 bit), Win 8.1 using 'Foxit Reader' to open the created pdf.
The pasted text preserved the original line structure.

What are your environment / used tools?

edit flag offensive delete link more

Comments

Foxit Reader is evidently the best workaround on the Windows platform to the line breaks on copy from PDF issue. It is worth noting that PDF is designed as an output (rather than input) format. Refer these threads on the Superuser and Adobe forums.

oweng gravatar imageoweng ( 2016-03-04 13:29:03 +0200 )edit
minttux gravatar imageminttux ( 2016-03-12 09:30:19 +0200 )edit

@minttux, you are stuck with the carriage returns. I get the same result here using Document Viewer under Debian. It is best to perform a search/replace using a regex afterwards to remove the unwanted CR.

oweng gravatar imageoweng ( 2016-03-13 01:34:58 +0200 )edit

you have try any regex to solve this problem? when i copy from libreoffice its correct but in pdf breaks lines

minttux gravatar imageminttux ( 2016-03-24 19:29:31 +0200 )edit

@minttux, does the answer here help?

oweng gravatar imageoweng ( 2016-03-25 02:17:12 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-03-04 06:48:07 +0200

Seen: 552 times

Last updated: Mar 04 '16