Pastemagic’s creator was putting together a research paper, assembling content from various sources (web pages, PDF’s, book scans online) and constantly getting super-frustrated with having to constantly fix formatting, delete linebreaks, and manually type out text. Ugh!
But then he realized you could build a webpage to automate all of it, and voilà — Pastemagic was born.
- Remove text formatting
- Remove line breaks
- Image to text (OCR)
- Browser support
- Privacy / legal
- Future directions
- Contact (bugs, suggestions)
How is “remove text formatting” different from the “paste without formatting” command many word processors have?
“Paste without formatting” removes all formatting, including formatting that might be important to keep — like italics or links.
Pastemagic allows you to choose the formatting you want to keep. It defaults to just italics and strikethru (since those are often part of a text’s meaning), but also gives you choices on links, bold/headings, lists, and superscript/subscript.
Can Pastemagic “sanitize” HTML, e.g. when copying from Word into a CMS (content management system)?
Yup — Pastemagic removes all extraneous tags and all CSS styling, and guarantees output will consist only of text with p (paragraph), a (link), b (bold), i (italics), s (strikethru), sup (superscript), sub (subscript) tags, and the list tags ul (bulleted list), ol (numbered list), and li (list item). Pastemagic also converts all sequences of whitespace characters (including non-breaking spaces and invisible spaces) to a single standard space.
Sanitizing HTML like this can be particularly useful when copying from Word, which is notorious for injecting mountains of potentially problematic HTML into the clipboard.
Why does Word need a special Paste shortcut?
Because Word is annoying, that’s why! 😜
But seriously, Pastemagic copies its output onto the clipboard in HTML format, which includes desired styles like bold, italics, etc. but intentionally does not include a font or font size (that’s the original “magic”). Then when a word processor pastes it in, because there’s no font or font size, it should follow the document’s existing font and font size — which is exactly what Google Docs, Word online, and Apple Pages all do.
Unfortunately, when Word pastes paragraphs of HTML which doesn’t include a font or font size, it assumes it must be Times New Roman 12 pt, even if that has nothing to do with your document. Dumb! (Microsoft, if you’re listening, stop it will ya?) So you have to use Word’s special “Merge Formatting” (Windows) or “Paste and Match Formatting” (Mac) command — which maintain the current font and font size, but still obey formatting like bold and italics.
On Windows, the good news is you can make “Merge Formatting” the default, which we highly recommend for everyone — go to File > Options > Advanced > Cut, copy and paste (the second section), and set Pasting from other programs (the fourth line) to Merge formatting (the second option).
Does Pastemagic support all word processors?
We’ve tested and confirmed that Pastemagic works fully with Word (desktop), Word (online), Google Docs, and Apple Pages.
When stripping formatting and pasting into LibreOffice, OpenOffice, or Apple TextEdit, they unfortunately always convert text to Times New Roman 12 pt (or equivalent), and don’t have anything similar to Word’s “Merge Formatting” — so you can still paste, but you may still have to manually fix things like font, font size and line spacing.
What does “smart” superscript/subscript do?
It preserves superscripts and subscripts only if we can detect them as part of a basic equation or mathematical expression. Otherwise they’re discarded (useful for stripping footnotes).
When I paste from a PDF, why don’t I get any formatting?
Most PDF readers only copy plain text to the clipboard, not formatting like bold or italics. This includes Chrome, Firefox, Edge, and Adobe Acrobat Reader.
PDF readers which do copy formatting include Preview on macOS and Adobe Acrobat Professional (in some versions, you’ll need to right-click and select “Copy with Formatting”).
What is “remove line breaks” for?
Sometimes when you copy from a source and paste into your document, you’ll discover the lines are separate instead of forming paragraphs — so you have to delete the line break after every line in order for the paragraphs to wrap properly, which gets real annoying real fast... “Remove line breaks” automates this for you.
This is most common when copying from PDF’s, which because they’re a format meant for display and not editing, generally don’t contain any information on paragraphs. But it’s also common with any plain text format, such as e-mails or .txt files.
How does “smart detect” work?
“Smart detect” uses a number of factors to try to determine which lines belong together, including things like line length, capitalization, and punctuation. It isn’t always 100% perfect, but it’s still a big time-saver.
Can I grab text straight from my mobile device’s camera?
Yes. On a mobile device with a camera, using the “upload” link on the “image to text” tab will give you the option of taking a photo directly. You can then copy and paste the resulting text into whatever other mobile app you’re using, such as Google Docs or your e-mail app.
Alternatively, if you have a Mac and an iPhone or iPad, you can take advantage of Apple’s Universal Clipboard which shares a clipboard between devices. You can copy a photo straight from the Camera app and paste it into Pastemagic on your Mac, or take the photo from within Pastemagic on your iPhone or iPad, copy the text, and then paste that text into the desired program on your Mac.
Which image formats does Pastemagic support?
Pastemagic supports clipboard images in JPEG, PNG and GIF format. Pastemagic also supports images wrapped in HTML (e.g. when copying an image from Google Docs) as well as links to images.
Why isn’t my image-to-text (OCR) working well?
The OCR engine requires horizontal text on an even background, with sufficient contrast between characters and background.
Problems can happen when the text is warped or at an angle, or when brightness changes across the page — both of which are common when taking photos of a page. This is why we recommend using screenshots or scans of text, or else to be very careful when taking photos that the lighting is completely even, the page is completely flat and straight, and that the page background is the brightest part of the image.
My image-to-text (OCR) is producing complete gibberish! What gives?
Follow the tips above for taking good photos — when text is at an angle or the background has uneven lighting, OCR won't work.
What powers your OCR?
Why is image-to-text in “beta”?
There are still a number of improvements we’re investigating, related to language selection and image pre-processing.
What if I have a ton of images to OCR?
Then please don’t paste them all into Pastemagic — our web server is a shared resource. Instead, download Tesseract and do it on your computer. It’ll be faster, we guarantee it!
Which browsers and devices does Pastemagic support?
Pastemagic supports all browsers with modern clipboard support, such as Chrome, Firefox, Safari and Opera.
Internet Explorer and the current version of Edge are not supported, but the next version of Edge is (EdgeHTML 17, due sometime in 2018).
Pastemagic is designed for desktops/laptops with keyboards, but it also works on iOS (Safari) and Android (Chrome) — it may just takes a few taps to trigger the Copy or Paste menu commands.
Does Pastemagic work offline?
Remove text formatting and remove linebreaks work offline, as long as you’ve already opened Pastemagic.
Image to text requires an Internet connection to work.
Does Pastemagic read my content?
For remove text formatting and remove linebreaks, your content never leaves the browser.
For image to text, your image gets sent to us, but we delete both the image and its converted text from our servers immediately after sending the text back to you. We’re sure your images are fascinating, really — but sorry, we’re just not interested (and don’t have the disk space besides).
Do you track me?
We use Google Analytics to measure usage of Pastemagic. It is 100% anonymized — we don’t know who you are.
What are your terms of service?
As a condition of using Pastemagic, you will not use Pastemagic for any purpose that is unlawful, or in any manner that could damage, disable, overburder or impair Pastemagic’s servers, or interfere with any other party’s use and enjoyment of Pastemagic. Pastemagic does not make any assurances with regard to the accuracy of its output, which is delivered on an “as-is” and “as-available” basis. Pastemagic disclaims all warranties, express or implied, including any warranties of accuracy, non-infringement, and fitness for a particular purpose. You assume total responsibility for your use of Pastemagic, and your sole remedy against Pastemagic for dissatisfaction with the site or its output is to stop using Pastemagic.
Are you adding new features or improving Pastemagic?
Absolutely. We launched in April 2018 and are actively looking for ways to improve it. Please e-mail us (below) if there’s anything you’d like to see, or anything not working the way you’d like.
How do I know Pastemagic will stick around? Do you make money?
Pastemagic is a hobby project, but we do pay for web hosting. If and when growth warrants it, we’ll add a virtual tip jar or a small amount of advertising to cover the cost of things like OCR processing. As long as people keep using it, we plan to keep maintaining it. (Plus, we use it all the time ourselves, so there’s that.)
How can I contact you?
We’d love to hear from you! Especially if you’ve found bugs, have ideas for improvement, or a piece of content isn’t formatting the way you’d like.