Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9024609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T06:03:41+00:00 2026-06-16T06:03:41+00:00

I am generating text from pdf file with the help of pdftotext My issue

  • 0

I am generating text from pdf file with the help of pdftotext
My issue is not with pdftotext but it is with formating the text accordingly

Salman              Madhuri             Mohnish             Renuka                Anupam
Khan                Dixit               Behl                Shahane               Kher
Prem                Nisha Chou...       Rajesh              Pooja Chou...         Prof. Siddh


Hum Aapke Hain Koun...! (1994) - Full cast and crew
www.imdb.com/title/tt0110076/fullcredits
Hum Aapke Hain Koun...! on IMDb: Movies, TV, Celebs, and more... ... IMDbPro.com
offers representation listings for over 120,000 individuals, including actors, ...

I need output to be as

Salman Khan Prem
Madhuri Dixit Nisha Chou...
Mohnish Behl Rajesh
Renuka Shahane Pooja Chou...
Anupam Kher Prof.

Hum Aapke Hain Koun...! (1994) - Full cast and crew
www.imdb.com/title/tt0110076/fullcredits
Hum Aapke Hain Koun...! on IMDb: Movies, TV, Celebs, and more... ... IMDbPro.com
offers representation listings for over 120,000 individuals, including actors, ...
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T06:03:44+00:00Added an answer on June 16, 2026 at 6:03 am

    Not sure what your delimiters are, but you could something like the following (kinda ugly, but it gets the job done):

    $namesAndContent = explode("\r\n\r\n", $theString);
    $nameRows = explode("\r\n", $namesAndContent[0]);
    $names = array();
    foreach ($nameRows as $row) {
        $items = preg_split('/\s{2,}/', $row);
        foreach ($items as $index => $namePart) {
            if (!array_key_exists($index, $names)) {
                $names[$index] = array();
            }
            $names[$index][] = $namePart;
        }
    
    }
    
    foreach ($names as $name) {
        echo implode(' ', $name) . "\r\n";
    }
    echo "\r\n";
    echo $namesAndContent[1];
    

    Demo: http://codepad.viper-7.com/Nr1Q4t

    The above would format the data (when the delimiters are correct), but I am wondering where the data is coming from (originaly and not the pdf), because I suspect there is a better way to solve your problem. Perhaps there is some API you can directly utilize

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am generating one PDF from the Code Behind File using StringWriter and HtmlTextWriter.
I am using com.lowagie.text.FontFactory in generating a PDF file and am trying to use
I am wondering if you could please help with generating .cpp/.h file from the
I am generating an XML document from a StringBuilder, basically something like: string.Format(<text><row>{0}</row><col>{1}</col><textHeight>{2}</textHeight><textWidth>{3}</textWidth><data>{4}</data><rotation>{5}</rotation></text> Later,
I'm looking for tools for generating random but realistic text. I've implemented a Markov
I'd like to take text from a standard text file and insert it into
I'm generating a CSV file from the following code public ActionResult Index() { var
What I tried to do is generating a text file on ASP.Net using C#.
I would like to know how I could generate code from a text file
I'm generating pdf with gem pdfkit (successfully) only issue that I have is that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.