Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Pdf to Latex convesrion

  1. #1
    Join Date
    Dec 2006
    Location
    1 AU from sun
    Beans
    80
    Distro
    Ubuntu 11.04 Natty Narwhal

    Pdf to Latex convesrion

    Hi guys,

    is there any way how to generate Latex Source file from Pdf ? I tried google and found nothing relevant Is it possible to generate such conversion tool ? I was thinking about writing code that would act like pdf viewer, but instead of rendering graphical output it would interpret the commands for visual formatting to Latex formatting. The text would be transfered with pdftotext. Could you help me with it ? I'm not familiar with programming of such things.

    thanx
    mostly harmless
    8)
    GS d- s+: a-- C++ UL P L++ E--- W++ N o K w+ O- M- V- PS- PE- Y+ PGP t+ 5++ X++ R+ tv++ b++++ DI- D++G e+++ h-- r-- y-

  2. #2
    Join Date
    Apr 2006
    Location
    Lancaster, UK
    Beans
    103
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Pdf to Latex convesrion

    just a hint, I think koffice has the ability to import .pdf files... don't know if that can help

    out of curiosity, why would you want to get LaTeX source from a pdf?

  3. #3
    Join Date
    Dec 2006
    Location
    1 AU from sun
    Beans
    80
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Pdf to Latex convesrion

    I want to get Latex source from pdf file, because there are some things that are more efficiently done in other app, which can export it to pdf.
    Can KOffice export files to Latex ?
    mostly harmless
    8)
    GS d- s+: a-- C++ UL P L++ E--- W++ N o K w+ O- M- V- PS- PE- Y+ PGP t+ 5++ X++ R+ tv++ b++++ DI- D++G e+++ h-- r-- y-

  4. #4
    Join Date
    Apr 2006
    Location
    Lancaster, UK
    Beans
    103
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Pdf to Latex convesrion

    yes, koffice can export to LaTeX, as well as OpenOffice. Don't expect great things from the koffice pdf import though, I just tried it an the results weren't that impressive... I think it depends on the complexity of your document

  5. #5
    Join Date
    Dec 2006
    Location
    1 AU from sun
    Beans
    80
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Pdf to Latex convesrion

    thank you very much
    mostly harmless
    8)
    GS d- s+: a-- C++ UL P L++ E--- W++ N o K w+ O- M- V- PS- PE- Y+ PGP t+ 5++ X++ R+ tv++ b++++ DI- D++G e+++ h-- r-- y-

  6. #6
    Join Date
    Dec 2004
    Location
    Manchester
    Beans
    2,086
    Distro
    Ubuntu Mate 15.10 Wily Werewolf

    Re: Pdf to Latex convesrion

    remember that PDF's main design goal is visual layout. it does not contain structural information.

    a latex will specify that something is a section or subsection heading, pdf only says what font,size and position the words should have.

    also latex keeps track of figures, tables and references, and only puts the numbers in when exporting to pdf (or dvi if you are oldschool). the pdf file will just have the numbers, not the associations.

    you would need clever code to rebuild all the information that is lost in a pdf file.

    if you just want to make small changes to a pdf file you might find some useful information at http://www.linux.com/article.pl?sid=07/03/09/1810218

  7. #7
    Join Date
    Nov 2006
    Beans
    192

    Re: Pdf to Latex convesrion

    Quote Originally Posted by slaanco View Post
    is there any way how to generate Latex Source file from Pdf ?
    No. Not in the way that you mean. There are several quite good text-extractors from PDF, and even some which try to deduce structures like lists and headings, but their output is either Word (virtually useless) or XML (quite useful)...but not LaTeX format, as far as I know.

    Trying to get LaTeX out of a PDF file is like trying to recreate whole cows out of hamburgers, or turn scrambled eggs back into chickens. A PDF is a dead-end document, a one-way street, and the process of creating a PDF obliterates all the useful information that was in the application that created it.

    ///Peter

  8. #8
    Join Date
    Nov 2004
    Location
    Nyack NY USA
    Beans
    988
    Distro
    Ubuntu Development Release

    Re: Pdf to Latex convesrion

    To reiterate since I had to do this recently:

    You can get the text out but not equations.

    I accidentally deleted my lyx file and had to recreate from a pdf. Not nice.

    Looks like kword is one easy method to get the text.
    "Linux is evolution, not intelligent design." - Linus Torvalds

  9. #9
    Join Date
    Apr 2005
    Location
    Canada
    Beans
    641
    Distro
    The Feisty Fawn Testing

    Re: Pdf to Latex convesrion

    Abiword (with the plugins) can open a pdf and export as latex too. Again it is unlikely the formatting is going to come out very well.
    Registered Linux User 425324
    Ubuntu user # 12843
    Wrapping workspaces in Gnome
    Gmail notifier for Dzen

  10. #10
    Join Date
    Dec 2006
    Beans
    77
    Distro
    Ubuntu 6.10 Edgy

    Re: Pdf to Latex convesrion

    Hi,
    you can also try the commande line tools:
    [
    • pdftohtml
    • pdftotext
    • null


    And then get the output into Latex.
    Thanks to all who help me out and the developpers!

    Friendly greetings... CU

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •