jump to navigation

Convert/Import from PDF and Keep the Formatting April 10, 2007

Posted by Carthik in applications, guides, microsoft, office, ubuntu.
trackback

I have often wanted to convert a PDF file to a MS Word (.doc) file or an openoffice.org file. Usually I just copy the text from the PDF file and paste it in the new word document. Soon, this gets pretty tiring.

Recently I found a way to convert a pdf file to other formats, including .doc and .odt which preserves the formatting of the text pretty well. It is not perfect preserved but it is way better than having no formatting at all.

The secret goes by the name KWord. KWord is a KDE application that has a pdf “import” feature which lets you import either entire pdf documents or just a few pages from a pdf document while preserving the formatting! Of course - this only works for pdf documents which are not scanned images of pages. I tried it out on files created using \LaTeX, MS Word and OpenOffice. The font sizes in the imported document are larger than they need to be, but at least the headings are heading, the normal text is normal text, and the bullets are bullets!

KWord - file menu
Start the import using the “File” -> “Import” option in the main KWord menu.

Kword - import pdf
After you select the pdf file to be imported, you will see a window like the one above where you can specify the pages you want to import. I did not change the default selected options - changing them and seeing what happens is an exercise left to the reader. :)

Of course, if you want to install KWord on your Ubuntu system, you can run the following command from the terminal window:
$sudo apt-get install kword

Then you can launch KWord using:
$KWord &
or by clicking the entry for KWord in the menu on your desktop.

Comments»

1. Dirk Gently - April 10, 2007

This sounds useful. I’ve been trying to find a way to preserve the text alignment in particular….as it seems to forget where it was, break the sentences where they should wrap and think everything should be “left”……is this a left wing conspiracy???? lolololol

2. .bootstrap - April 10, 2007

Convert/Import from PDF and Keep the Formatting

What a great thing - KWord from KDE Office seems to be the solution.

3. Nelson - April 10, 2007

Wow! Really useful! You’ve saved me a lot of work with this.

4. cenebris - April 10, 2007

This option should be implemented in OOo…

5. Ubuntu | Carthik Sharma: Convert/Import from PDF and Keep the Formatting - April 10, 2007

[...] (more&#823 Previous Post: Eric Lake: You aren’t running Ubuntu? » Next Post: Jerome S. Gotangco: Dapper needs an update » Related Reading: [...]

6. n8k99 - April 10, 2007

oh freakin’ fantastic! i have been using kword pretty exclusively for six months and _never_ even thought about such a thing much less tried it out! i’m gonna go convert all my pdfs to .do^W.odt right now.

ok, maybe not all of them.

BTW, thanks.

7. Eleftherios Kosmas - April 11, 2007

lifesaver… cenebris is wright “This option should be implemented in OOo…”

8. Marcus - April 11, 2007

ooh neat. thanks!

9. Dirk Gently - April 12, 2007

Anyone thought to let the OpenOffice peeps know about this feature, and request they add it in?

10. carthik - April 12, 2007

Dirk, so how’s you detective agency doing? ;)

11. Dirk Gently - April 12, 2007

The experiment on the cat is still in progress, although I suspect he may be dead…..judging by the smell. lol.

So far, only two people have gotten the “Dirk Gently” reference. lol. I am thinking about doing two “about me” pages…..one about me, the other about Dirk Gently, as created by the late genius known as Douglas Adams.

12. ArtInvent - April 12, 2007

I’ve often wondered why pdf isn’t openable and editable in every decent word processor. It’s been the de facto document exchange format for years, and we’re only now getting around to actually being able to edit it freely? Good grief. If a dinky little prog like KWord can seem to manage it, why can’t a behemoth like OOo?

13. ArtInvent - April 12, 2007

Not to slight KWord or anything. Looks like a pretty capable prog.

14. ManwyMania » Convierte o importa un documento PDF sin perder el formato - April 14, 2007

[...] Este artículo es una traducción libre no oficial de “Convert/Import from PDF and Keep the Formatting“. [...]

15. ibidnah - April 14, 2007

convert /import and keep pdf formatting and then there it is and i can edit. terrific appreciate the info and well enoughh written awith what to do and how to do it succinct. terrific.

16. ibidnah - April 14, 2007

alll-lrighttttteeee then.

17. sx4teryzd344nlw - April 25, 2007

Tried importing PDF into KWord on several occasions and the result is poor formatting and it will not import images from the PDF file. Not so great I would say!

18. Friday Hot Links– Week of 5/11 at sfp101: Stress-Free Productivity - May 11, 2007

[...] Importing PDF text and formating into documents on Linux Ubuntu Blog- Convert/Import from PDF and Keep the Formatting [...]

19. Importar desde PDF manteniendo el formato « EsUbuntu.org - May 13, 2007

[...] de Ubuntu Blog  No Comments Leave a Commenttrackback addressThere was an error with your comment, please try [...]

20. Ron Hitler Barassi - May 15, 2007

KWord is good if the PDF document you’re converting is text-only or has only one or two images. If the PDF document is more complex than that, you’re wasting your time with KWord. Thanks carthik anyways.

21. Wezp Directory - June 9, 2007

KWord is good if the PDF document you’re converting is text-only or has only one or two images.

22. addthe - June 20, 2007

great job, but 105mb, hmm my admin will punish me :P

23. Joaquim - August 2, 2007

“Of course - this only works for pdf documents which are not scanned images of pages.”… but that’s quite what I’m needing now, converting some scanned as images pages to text format (.odt or .doc might do.) anyone can give suggestions?

24. linuxloon - August 9, 2007

Thanks for the tip. Saved me a lot of work. I’m adding this to my personal Tip’s-n-Trick’s list.

25. Convert/Import from PDF and Keep the Formatting « Ubuntu Blog « Martin Schaaf’s Blog - April 1, 2008

[...] Convert/Import from PDF and Keep the Formatting « Ubuntu Blog Filed under: Misc — Tags: convert, import, kword, pdf, pdf convert, pdf import — mascha @ 14:44:22 +0000 Convert/Import from PDF and Keep the Formatting « Ubuntu Blog [...]