Question: How to fetch text from pdf using ColdFusion

Question

How to fetch text from pdf using ColdFusion

Answers 0
Added at 2017-01-04 10:01
Tags
Question

I created a pdf using cfdocument and some output in it. Now I want to extract the text back from this pdf back. How to do that?

Here is how I created the pdf.

<cfdocument format="PDF" filename="FancyPDF.pdf">
    <cfoutput>
        <!--- Section 1 --->
        <cfdocumentsection name="bookmark1">
            <cfdocumentitem type="header">
            <h1 style="text-align:center;">BIG FANCY HEADER</h1>
            </cfdocumentitem>
            Bacon ipsum dolor sit amet sirloin fatback #dateformat(now(), "short")#
            <cfdocumentitem type="footer">
            <h1 style="text-align:center;">Page #cfdocument.currentPageNumber# of #cfdocument.totalPageCount#</h1>
            </cfdocumentitem>
        </cfdocumentsection>

        <!--- Section 2 --->
        <cfdocumentsection name="bookmark2">
            <cfdocumentitem type="header">
            <h1 style="text-align:center;">2nd page header</h1>
            </cfdocumentitem>
            Bacon ipsum dolor sit amet sirloin fatback #dateformat(now(), "short")#
            <cfdocumentitem type="footer">
            <h1 style="text-align:center;">Page #cfdocument.currentPageNumber# of #cfdocument.totalPageCount#</h1>
            </cfdocumentitem>
        </cfdocumentsection>
    </cfoutput>
</cfdocument>
Answers
Source Show
◀ Wstecz