John Davidson

Can't get rid of tabs and white space from a string php

0 comments
Message:


I have tried just about every trick in the book, and the white space and tabs persist


I ran 'Recognize Text' in Adobe Acrobat to convert an image into a pdf where I could grab the text.


The text comes in, but there is a lot of what 'looks' like white space and tabs, but all the usual tricks won't get rid of them:


 $ltxt1 = str_replace("\x0B","",str_replace("\0","",str_replace(",","",str_replace(" ","",str_replace("\t","",str_replace("\n","~",$text))))));

and


$ltxt = preg_replace('/\s+/', '', $ltxt1);

There is some issue related to the way I made the text renderable on the face of the pdf doc is my guess



My Answer:
I help you with something specific?

Rate this post

5 of 5 based on 6705 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us