PDF TO TEXT CONVERTER

Reference: http://okfnlabs.org/blog/2016/04/19/pdf-tools-extract-text-and-data-from-pdfs.html

I already tested and installed a few good open source code, like pdfparser, pdfbox and pdfminer.

PDFPARSER:

 

  1. clone from https://github.com/smalot/pdfparser
  2. composer install
  3. test by creating a new file index.php in /works/pdfparser/index.php

    NOT GOOD!

 

PDFBOX:

  1. clone from https://github.com/schmengler/PdfBox
  2. composer install
  3. download jarfile  from http://pdfbox.apache.org/index.html (pdfbox-app-2.4.0.jar)
    then move it to /usr/bin
  4. test by creating a new file index.php in /works/PdfBox/index.php

    BUT NEVER WORKS BECAUSE ALWAYS COMPLAIN ABOUT ‘RUNTIME ERROR CANNOT ACCESS JARFILE’. ALREADY SET PERMISSION BUT THE ERROR STILL PERSIST. SO I RUN THE JAR VIA TERMINAL (READ: http://pdfbox.apache.org/2.0/commandline.html)

    BUT NOT GOOD!

PDFMINER INSTALLATION:
It use python 2.7

  1. clone from the source (https://github.com/euske/pdfminer/)
  2. Run setup.py

    Here I have to use ‘sudo’ to install because I got permission problem without it
  3. Test

    BEST OF THE OTHERS BUT STILL NOT GOOD! SELECT ALL THE TEXT THEN COPY PASTE STILL BETTER!

I TRIED TO INSTALL TESSERACT BUT EVEN WORSE THEN ABOVE!!!

PHP Tools

Install some PHP tools:

  1. PHP Coding Standards Fixer (http://cs.sensiolabs.org/)
    Installation: (Globally (Composer))

    Then make sure you have ~/.composer/vendor/bin in your PATH and you’re good to go:

    To find out the location of php-cs-fixer

    I can use the location for the netbeans plugins needed.
    Another reference: https://mattstauffer.co/blog/using-php-cs-fixer-to-fix-up-your-php-code
  2. PHP CodeSniffer
    Ref: http://purencool.com/install-and-test-phpcodesniffer-on-ubuntu
    http://askubuntu.com/questions/572956/adding-a-standard-to-php-codesniffer
    Installation:

    To find out the location

    To verify PHP_CodeSniffer is already installed, check like this:

    Ref: https://wisdmlabs.com/blog/how-to-format-php-code-to-wordpress-coding-standards-in-netbeans/
    To use it in netbeans, click: Source > Inspect…
  3. PHP Mess Detector & PDepend
    Ref: https://phpmd.org/download/index.html
    http://stackoverflow.com/questions/27958289/what-is-phpmd-and-how-to-use-it
    Installation: (Same way with php cs fixer to use composer globally)

    To find out the location for PHPMD and PDepend:



     
  4. PHP Copy/Paste Detector (PHPCPD)
    Ref: https://github.com/sebastianbergmann/phpcpd
    NOTE: DONT INSTALL FROM PEAR!
    Installation: (Use composer globally)

    To find out the location:

    Please read this: Installation of PHP Code Review Tools
    For integrating all the above tools in Netbeans!

Update PPA For PHP, Change PHP CLI Version

BEWARE! THIS WOULD MAKE YOUR LOCALHOST NOT WORKING LIKE WEB APP, PHPMYADMIN, ETC. NEED TO BACKUP YOUR DATA FIRST!

I need to update the PPA for php from ppa:ondrej/php5-5.6 to ppa:ondrej/php because the earlier ppa already deprecated. Here is the step for PPA migration to ppa:ondrej php. Continue reading “Update PPA For PHP, Change PHP CLI Version”