Print checks and custom forms with PHP - php

I have been working on a web based financial manager application that is written almost exclusively in php. I would like to be able to allow users to enter and print checks to their check stock.
My first thought was that I could use something like FPDF to create a .pdf document that is the correct size and places the data (date, amount, english text amount, vendor name) in the correct location. That works fine.
The problem I have is that when I go to print a 4.5" x 2.75" document (size does matter), Adobe Reader (browser pluggin and Windows version) places the document on the users available printer pages. Printers do not come with preset page sizes to it all the possible personal check sizes, and not all printers will allow users to add page sizes to the printer driver (yes you can add forms to windows through the print server; but they may or may not show up a an available form in the print driver).
I have read A LOT online on how to create custom form / documents, but am not getting my problem resolved. So I guess I am looking for suggestions on how to implement check printing from within my web app would be greatly apprecated.

You can try to run Cups server with your check printers connected to it. Cups server communicates with it's clients over IPP protocol.
You can create IPP printing job right from php using http://www.cups.org/articles.php?L545+TNews+Q
Printing jobs have attributes - media size is one of them.
So, this way user's OS won't print anything. User will just POST some query to http server, and php will create print job for cups server with media-size and some other attributes.

One of my clients uses tcpdf to print all of their checks. All of their checks are standard U.S. Letter sized.
As Dagon said, you can't control users printers from a PHP application - so instead how about you force them to use particular size checks? The full letter size checks my client uses are perfect - all of the year-to-date/deductions/tax stuff printed at the top and then the actual check at the bottom. They all go through a folding machine after printing so they can be mailed. (Employees with direct deposit get printed check stubs this way)

Related

Saving image with GD Handle

I am currently working on a website which will be used for displaying scores in several benchmarks. In order to accomplish this, i am using PHP(duh :D) for the database queries and the JPGraph library, which creates the graph and then displays and it as an image with the GD library.
The user of the site can select which chart he wants to see with a <form> that contains the following criteria:
The Client that ran the test
The Operating System the Client used at the time
The Benchmark that was used
And what type of chart he wants to see (Bar graph, line graph....)
All of this works fine, the graph is displayed without a problem in the <iframe> that it is supposed to be in.
However, I also want the user to be able to save the Graph, with, say a second button. I can get the GD handle of the image, but how can I use this to save the image to a file on the client?
Any help would be very welcome.
Regards, Andy

Add title screen to video on upload to YouTube via API

I currently use the YouTube API to allow website users to upload their videos through the site straight to our YouTube channel (adding META data etc) at the time of upload.
Ideally we would like to dynamically add some sort of title, watermark, opening screen or an image to the beginning and / or the end of the video. Essentially we just need any method of adding something to the video which adds some form of branding to it (even if just a plain company name at the bottom).
The uploads are from internal users (i.e. secure and trusted) and there is not an excessive amount so I would be happy to upload to our server first (instead of straight to YouTube), manipulate the video then upload to YouTube.
The site runs PHP on a dedicated Linux / Apache server setup.
Any suggestions greatly appreciated
Thanks
Here's a really quick and easy one: Invideo Programming. Invideo Programming lets you add a small logo to a corner of the video, or promote another video in a different corner, or both.
You can add this to the API via the Channels resource as as invideoPromotion attribute. We recently did a show on Google Developers Live explaining how to configure this on both the web UI as well as in the API. Check it out - I think this'll do what you need.

HOW to print to a Dot Matrix Printer from a PHP Web Application?

I created a web application in PHP.
The application should print a receipt in a dot matrix printer (Epson LQ300).
The receipt layout is customized and the paper is punched.
Right now I created a pdf with custom paper size, but the user should do 3 click to finally print the receipt, wich has some paper feeds errors.
So I want to let the user click on printer icon of the receipt and the next thing happens is the receipt being printed.
Let's asume that the priter is only one, localy, and default, so I first need to avoid select printer dialog.
How to do that from a PDF reader?
Asuming that I change the approach and use only HTML, and forget about PDF:
How to control the exact position of the fields ?
How how to avoid "Select Prnter Dialog"?

PHP Using imagegrabscreen

How could I use imagegrabscreen to get a thumbnail image and a full size image of a specific website.
I was thinking that I could have an array that I feed the wanted uri's into but I am a bit stuck on how I would set the wxh of the image I need to grab. I also think that I would need a thumbnail class and a fullimage class and call them when required.
Any better Ideas?
Keep in mind that imagaegrabscreen is Windows-only. If you have multiple displays set up, this function will only grab the primary display. Also, for this to work, your Apache service must be set to Allow service to interact with desktop otherwise you will just get a blank image.
This discussion covers the use of imagegrabscreen pretty well: Getting imagegrabscreen to work
There are a lot of other discussions about saving webpages as images, too - here are a few:
Website screenshots
Web Page Screenshots with PHP?
How can I generate a screenshot of a webpage using a server-side script?
PHP: How to capture browser window screen with php?
What is the best way to create a web page thumbnail?
Screenshot of current page using PHP
shell tool which renders web site including javascript
In any languages, Can I capture a webpage and save it image file? (no install, no activeX)

More efficient way of managing an online web store

I am about to start implementing an online web store for a client. The web store will be constantly receiving new products that will be added into the store's online web catalogue.
My current code design for adding items is a web form where an admin would enter in the name, description, and images of the product. Each item comes with multiple images both in thumbnail, high resolution, and sometimes 3D rotation (sequence of images).
My main concern with the web form is the uploading of many high resolution images. Waiting for the upload every time the admin submits a new item really makes it a slow process to add a bunch of new items into the catalogue. Is there a better way to build this system other than having a web form? Maybe something like an offline system that the admins can just "sync" to the online version. I don't mind learning something new and coding it myself, but also if there's something on the market already available to buy with similar features I'm all ears.
More info:
I will be the primary developer of this system and I'm only a novice in PHP, Ajax, jQuery, and AS3. The current website and system is authored in PHP with mySQL.
You can allow the editors to input images as zip files, and a progress bar would be good. You can have an inline upload that just happens when the images are selected, instead of uploading after the form post so that the editors do not feel the waiting effect.

Categories