process data when read PDF file with php

I´m traying to read PDF with php and laravel-5.6 i´m using this library smalot/pdfparser i´m getting all text from my PDF, but i need delete text when i´m getting this text.

this it´s data return when i´m reading:

Relación de residentes seleccionados
Agenda 1339
Residentes 208
Fecha 29/12/2022
Delegacion 4 Granada
Provincia 18 GRANADA
Concertacion 4 Concertadora 1
Plano 1 Plano 1
Articulo 4 Artículo 1
Zona 1 Zona 1
Código Nombre Domicilio Teléfonos Observacion
1794707 MARTIN CARRILLO MARIA ESMERALDA ALHAMBRA 10 958 54 38 93
1745591 ESPIGARES DIAS JOSE ANTONIO ALHAMBRA 11 958 54 33 32
1770062 GUTIERREZ TITOS JOSE MANUEL ALHAMBRA 12 958 54 04 10
1793228 MARTIN COBOS ANTONIO ALHAMBRA 18 958 54 33 28
1768807 GOMEZ CARRILLO JOSE ALHAMBRA 20 958 54 32 72
1830072 RODRIGUEZ RUANO BUENAVENTURA ALHAMBRA 21 958 54 35 86
1759534 GARCIA ARIAS MARIA ISABEL ALHAMBRA 22 958 54 07 87
1831938 RODRIGUEZ JIMENEZ MIGUEL ALHAMBRA 27 958 54 08 77
1722022 GUTIERREZ FERNANDEZ AMANDA HILDA ALHAMBRA 3 958 49 98 62
1746872 DIAZ FLORIAN DOLORES ALHAMBRA 30 958 54 33 99
1817587 PEREZ LASTRA SAUL ADAN ALHAMBRA 32 958 54 31 46
1724006 AMIGO MOLINA MARIA MATILDE ALHAMBRA 35 958 54 31 91
1745604 ESPIGARES GOMEZ JORGE ALHAMBRA 37 958 54 02 22
1745595 ESPIGARES ESPIGARES JOSE ALHAMBRA 40 958 54 31 83
1769210 GOMEZ ESPIGARES ANTONIO SALVADO
ALHAMBRA 42 958 54 94 08
1782233 JIMENEZ HUETE ENCARNACION ALHAMBRA 6 958 54 03 05
1816389 RAMOS FERNANDEZ JOSE VICENTE ALHAMBRA 8 958 54 08 15
1740732 ESPIGARES ESPIGARES PILAR ALHAMBRA 8 958 54 36 04
1829066 RUIZ TORICES ANA ANDALUCIA 0 958 54 36 27
1749185 DIAZ SANCHEZ ANTONIO ANDALUCIA 11 958 54 36 17
1740787 ESPIGARES ESPIGARES BLAS ANDALUCIA 2 958 54 02 53
1727106 CARRILLO CARRILLO JAIME ANDALUCIA 21 958 54 01 23
1740781 ESPIGARES DIAZ FRANCISCO ANDALUCIA 4 958 54 07 21
1842859 SANCHEZ GARRIDO MARIA DEL CARME
ANTONIO MACHADO 1 958 49 98 85
1819912 PEñA GALVEZ ENCARNACION ANTONIO MACHADO 5 958 49 98 71
1740705 ESPIGARES MARTIN SACRAMENTO AVDA. F. GCIA. LORCA 25 958 54 01 07
1740768 ESPIGARES CARRILLO ELENA AVDA. F. GCIA. LORCA 4 958 54 00 33
28/12/2022 9:49:54 Página 1 de 8

i need delete this

Relación de residentes seleccionados
Agenda 1339
Residentes 208
Fecha 29/12/2022
Delegacion 4 Granada
Provincia 18 GRANADA
Concertacion 4 Concertadora 1
Plano 1 Plano 1
Articulo 4 Artículo 1
Zona 1 Zona 1

i´m traying delete with this code:

for($i=0; $i<count($text); $i++){
if (str_contains($string, "Relación de residentes seleccionados")) {
$textConvert = str_replace($string, "", $text[$i]);
print_r($textConvert);
}
}

but return R not return only

Código Nombre Domicilio Teléfonos Observacion
1794707 MARTIN CARRILLO MARIA ESMERALDA ALHAMBRA 10 958 54 38 93
1745591 ESPIGARES DIAS JOSE ANTONIO ALHAMBRA 11 958 54 33 32
1770062 GUTIERREZ TITOS JOSE MANUEL ALHAMBRA 12 958 54 04 10
1793228 MARTIN COBOS ANTONIO ALHAMBRA 18 958 54 33 28
1768807 GOMEZ CARRILLO JOSE ALHAMBRA 20 958 54 32 72
1830072 RODRIGUEZ RUANO BUENAVENTURA ALHAMBRA 21 958 54 35 86
1759534 GARCIA ARIAS MARIA ISABEL ALHAMBRA 22 958 54 07 87
1831938 RODRIGUEZ JIMENEZ MIGUEL ALHAMBRA 27 958 54 08 77
1722022 GUTIERREZ FERNANDEZ AMANDA HILDA ALHAMBRA 3 958 49 98 62
1746872 DIAZ FLORIAN DOLORES ALHAMBRA 30 958 54 33 99
1817587 PEREZ LASTRA SAUL ADAN ALHAMBRA 32 958 54 31 46
1724006 AMIGO MOLINA MARIA MATILDE ALHAMBRA 35 958 54 31 91
1745604 ESPIGARES GOMEZ JORGE ALHAMBRA 37 958 54 02 22
1745595 ESPIGARES ESPIGARES JOSE ALHAMBRA 40 958 54 31 83
1769210 GOMEZ ESPIGARES ANTONIO SALVADO
ALHAMBRA 42 958 54 94 08
1782233 JIMENEZ HUETE ENCARNACION ALHAMBRA 6 958 54 03 05
1816389 RAMOS FERNANDEZ JOSE VICENTE ALHAMBRA 8 958 54 08 15
1740732 ESPIGARES ESPIGARES PILAR ALHAMBRA 8 958 54 36 04
1829066 RUIZ TORICES ANA ANDALUCIA 0 958 54 36 27
1749185 DIAZ SANCHEZ ANTONIO ANDALUCIA 11 958 54 36 17
1740787 ESPIGARES ESPIGARES BLAS ANDALUCIA 2 958 54 02 53
1727106 CARRILLO CARRILLO JAIME ANDALUCIA 21 958 54 01 23
1740781 ESPIGARES DIAZ FRANCISCO ANDALUCIA 4 958 54 07 21
1842859 SANCHEZ GARRIDO MARIA DEL CARME
ANTONIO MACHADO 1 958 49 98 85
1819912 PEñA GALVEZ ENCARNACION ANTONIO MACHADO 5 958 49 98 71
1740705 ESPIGARES MARTIN SACRAMENTO AVDA. F. GCIA. LORCA 25 958 54 01 07
1740768 ESPIGARES CARRILLO ELENA AVDA. F. GCIA. LORCA 4 958 54 00 33
28/12/2022 9:49:54 Página 1 de 8

what i´m doing wrong? or how i can to do this? also i need loop to get all data separately i´m thinking that i can count White spaces for getting my data.

I need nombre (name), domicilio (address), telefonos(phone)

thanks for read and help me

from Newest questions tagged laravel-5 – Stack Overflow https://ift.tt/2YxqIIj
via IFTTT

Related Posts

Codeigniter : Parse error: syntax error, unexpected ‘const’ (T_CONST), expecting variable (T_VARIABLE) in Laravel project

I’m getting following error: **Parse error: syntax error, unexpected ‘const’ (T_CONST), expecting variable (T_VARIABLE)** Note : It’s working in local but facing issue in production server. private…

Firebase receive notification while tab is active or on focus

What i want is to be able to perform an action when a user receives a notification while the browser is open and tab is active or…

Laravel’s alias loader does not find class

We have a legacy project that we cannot update and we need to make some changes in symfony’s Response.php in vendor. We have solved this by copying…

Laravel 5 – generic document management

I have a system where you can create different types of unique documents. For instance, one document is called Project Identified and this expects certain inputs. Originally,…

Laravel Nova limit the results in indexQuery

I ran intro a situation where I need to limit the results of a resource to only 3 results. To be more specific, based on the logged…

Auditoria en laravel 5.8 [closed]

Cómo puedo automatizar el registro de actividades de un usuario en laravel? Si un usuario ingresa a un app de laravel, debo guardar toda su actividas, a…

Leave a Reply

Your email address will not be published.