Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-18-2013, 04:21 AM   PM User | #1
doubledee
Regular Coder

 
doubledee's Avatar
 
Join Date: Mar 2011
Location: Arizona
Posts: 612
Thanks: 19
Thanked 0 Times in 0 Posts
doubledee has a little shameless behaviour in the past
Displaying Receipts in App

I want to take all of my paper receipts, and build a PHP app to store all of the data off of them. This would include inputting whatever data I think is relevant into the app, plus scanning in the receipts so I have an image of the original.

My question is this...

Should I scan each paper receipt as a PDF or instead as an image file (e.g. GIF, PNG, etc)??

Because these are receipts, I don't see a need for them to be "searchable" or to use OCR on them.

Using a PDF format might be more "platform independent", however, it would also be a pain for the app.

What I am envisioning is a web-form which displays pertinent data for each receipt, and then a thumbnail which is hyperlinked, and which when clicked loads a larger image file in the same web-form. (If the receipts were scanned in as a PDF, then you would have to launch another window to display things which isn't as tightly integrated if you follow?!)

Any thoughts?


Debbie
doubledee is offline   Reply With Quote
Old 02-18-2013, 03:16 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,635
Thanks: 4
Thanked 2,448 Times in 2,417 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
It doesn't matter what you scan them as, just make it as small as possible. If you don't need to search for text on it, than png or jpegs will probably be smaller.

Since you won't be scanning with PHP anyways, you simply accept the upload for whatever filetypes you want. Scanning in PHP is a mess to do, so it'd be much easier to use C++, C# or even Java to do it.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
Fou-Lu is offline   Reply With Quote
Old 02-19-2013, 05:57 AM   PM User | #3
doubledee
Regular Coder

 
doubledee's Avatar
 
Join Date: Mar 2011
Location: Arizona
Posts: 612
Thanks: 19
Thanked 0 Times in 0 Posts
doubledee has a little shameless behaviour in the past
Quote:
Originally Posted by Fou-Lu View Post
It doesn't matter what you scan them as, just make it as small as possible. If you don't need to search for text on it, than png or jpegs will probably be smaller.
I thought GIF was the best for Text?

How would a GIF - or other image formats - compare to a PDF as far as readability for a receipt with text and numbers on it?


Quote:
Since you won't be scanning with PHP anyways, you simply accept the upload for whatever filetypes you want. Scanning in PHP is a mess to do, so it'd be much easier to use C++, C# or even Java to do it.
You are misunderstanding me...

I am thinking of building a simple app using PHP to display a web-form to enter and display the receipt data, and then have a hyperlink which would display an image of the receipt - maybe in a pop-up window or in the original form.

(If I scan things as a PDF, then my app - or whatever - would have to launch Adobe Acrobat to display the PDF receipt which is more cumbersome, don't you think?!)


Debbie
doubledee is offline   Reply With Quote
Old 02-19-2013, 01:53 PM   PM User | #4
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,635
Thanks: 4
Thanked 2,448 Times in 2,417 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
No, I'm not misunderstanding what you are doing. That was just a polite way of saying I don't know why you are posting this in the PHP forum since it has nothing to do with PHP.

I'm not a graphics expert, so I don't know the comparison between the gif and png. My understanding is that png has a much better compression algorithm for it, so an image that's identical in both png and gif should be smaller in png format. Personally I'd probably use a pdf. I don't know the pdf structure aside from the header, but I understand it's searchable which means I can write a program to extract the information from it. I'm far too lazy to do data entry. After that I may convert it down to a png.
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
Fou-Lu is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:47 PM.


Advertisement
Log in to turn off these ads.