Opened 6 years ago

Closed 6 years ago

#10726 closed Bug (wontfix)

Formatting not preserved when copying from a PDF into CKEditor

Reported by: Tracey Clark Owned by:
Priority: Normal Milestone:
Component: Core : Pasting Version: 4.0
Keywords: Cc:

Description

When pasting text from a PDF file, not all formatting is preserved. I have replicated the bug on the demo site for the nightly version with http://nightly.ckeditor.com/.

Reproduced on: Chromium & FireFox on Ubuntu 13.04 IE9 on Windows 7

Steps to reproduce: Open a PDF document, copy text (either with menu or Ctrl-c) Paste the text into CKEditor (either with menu or Ctrl-v) Not all formatting is preserved. This is not an issue when pasting from Word docx or an .html file opened in LibreOffice.

Formatting that is lost: Images, links (and the underscore), underline, italics, bolding, some line spacing, justification (center, right), table converted to plain text, font faces, text color

Attached are the original PDF and a screenshot of what was pasted.

I have searched Trac and the forums, but not seen this issue reported. My apologies if it turns out to be a duplicate.

Attachments (2)

html_export.pdf (118.4 KB) - added by Tracey Clark 6 years ago.
Test PDF file
08142013 - screenshot - paste_from_pdf.png (103.2 KB) - added by Tracey Clark 6 years ago.
Screenshot of formatting after pasting into CKEditor

Download all attachments as: .zip

Change History (3)

Changed 6 years ago by Tracey Clark

Attachment: html_export.pdf added

Test PDF file

Changed 6 years ago by Tracey Clark

Screenshot of formatting after pasting into CKEditor

comment:1 Changed 6 years ago by Jakub Ś

Resolution: wontfix
Status: newclosed

Below is HTML that browser sees when you paste from PDF:

This is a very simple HTML file.<br>LibreOffice file exported to PDF for testing copy &amp; paste to verify that formatting shows up properly<br>Picture - Apache logo<br>Apostrophes Here's some of them's apostrophe's<br>Right/Left ‘single quotation marks’ 'straight quotation marks'<br>Right/Left “smart double quotation marks”<br>Underscored links<br>Italics<br>Spacing letters/paragraphs<br>Centering<br>Bolded text<br>• Bullet items 1<br>• Item 2<br>• Item 3<br>Table (width/borders)<br>Col 1 Col 2<br>Row 2 Col 2 Row 2 Col 2<br>Font Bitstream<br>Charter<br>Font Courier<br>Font - Ubuntu Light<br>Text color - this is red. This is a known issue with ckeditor

As you can see except for few BR's there is no HTML passed at all. The very same code (after the browser) receives CKEditor.

I'm sorry but CKEditor will not recreate nice HTML out of nothing. PDF documents don't seem to work with browsers at all - text inside them is seen in a same matter as text in notepad.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy