Skip to main content
Participant
Aug 17, 2023 2:38 PM UTC
Question

Convert PDF to plain TXT

Hi,

With Adobe Acrobat Pro, I am able to convert a PDF into a plain TXT format.

 

I would like to do this conversion via an API. In the Adobe PDF Services documentation, there is only an option to convert to RTF, not TXT. 

 

I was wondering if there was a way to convert a PDF to plain TXT using an API service.

 

Thanks!

    This topic is closed to new replies. Start a new post to keep the conversation going.

    6 replies

    Joel Geraci
    Community Expert
    Community Expert
    Aug 17, 2023 3:07 PM UTC

    You can use the Extract API to get a JSON representation of the PDF then filter it to get only the text elements. From there you can output plain text. 

    Translate
    peach11Author
    Participant
    Aug 17, 2023 3:14 PM UTC

    Thanks for your reply!

     

    When I convert the PDF to text via Acrobat Pro, it orders the text in a way that is useful to me -- the rows of the tables are formatted in paragraphs of text. I've attached a sample output PDF and TXT file. I don't think it would be possible to retain this format when using JSON. 

     

    This seems like a really roundabout way to complete a simple task. Why does the API not support plain text? It would be really useful to us.

    Translate
    Joel Geraci
    Community Expert
    Community Expert
    Aug 17, 2023 7:30 PM UTC

    The usefulness of the JSON really depends on your goals. I find the output from Extract to be far more useful than plain text because I can easily format it into whatever I need. Also, tables are both represented as tables in the JSON similar to how HTML does and it can also output them as either .csv or .xslx. 

    Translate