/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] extract pdf – > php

how can i extract from a pdf file a line of text ?

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@ariellOct 09.2008 — a) do not do it, for it's error-prone.

b) if you want to take the risk, though, use this:

PHP has a function: "bool cpdf_begin_text ( int pdf_document )"

NOTE: int, handle to, NOT the pure file name.

cpdf_begin_text() starts a text section. If it works, you get TRUE. Otherwise FALSE. An created text section must be ended with cpdf_end_text().

e.g... given a section from pdf-text:
[code=php]
<?php
cpdf_begin_text($pdftextsection);
cpdf_set_font($pdf, 16, 'Verdana', 'WinAnsiEncoding');
cpdf_text($pdftextsection, 100, 50, 'BlaBlaBla');
cpdf_end_text($pdftextsection)
?>
[/code]


I GUESS, php.net has some documentation on this, it's too much to explain here...

Best from the south.
Copy linkTweet thisAlerts:
@BladezauthorOct 09.2008 — thank you for the winderful hint.. ariell appriciate this. Jus as an additional question complete my understand.. ok it uses coordinates...hmmm.. ok then this is not the way... oh god got to use tradisional via database hehehe...

i think i understand thank you alooootttt for the lil bit knowledge sharing u did.. i think i can lead my way from here.. thx.
Copy linkTweet thisAlerts:
@ariellOct 09.2008 — A pleasure! If you get stuck on the way, come back...

Best from the south.
Copy linkTweet thisAlerts:
@evanpanFeb 04.2016 — [COLOR="#000000"]I wonder whether you have any experience about[/COLOR] [COLOR="#000000"]text extraction process from pdf files[/COLOR][COLOR="#000000"]? Any suggestion will be appreciated. Thanks in advance.





Best regards,

Pan

[/COLOR]
Copy linkTweet thisAlerts:
@TrainFeb 04.2016 — [COLOR="#000000"]I wonder whether you have any experience about[/COLOR] [COLOR="#000000"]text extraction process from pdf files[/COLOR][COLOR="#000000"]? Any suggestion will be appreciated. Thanks in advance.





Best regards,

Pan

[/COLOR]
[/QUOTE]

Pan, it is better to start a new thread than drag up this old one from 10-08-2008,.

Please do so.

Locking it.
×

Success!

Help @Bladez spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.15,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...