943,771 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Marked Solved
  • Views: 1052
  • PHP RSS
Jul 2nd, 2008
0

Need help creating printout script from database

Expand Post »
I need a routine for printing out to pre-printed paper forms.

We recently had a programmer install in our office software written in php , and to be used locally through localhost on our pc, mysql, php and apache2.2 all installed, the software is working well, however we have a large supply of pre-printed forms which we want to use up first before using the print direct to ordinary paper, the printout we have just now is printed in a graphic format, and can't find a way to adjust this to our form, we need a routine that will collect data directly from our print.php file and adjust it to suit to our form format.

The programmer said this was not possible, but I am sure there must be a way,


Can anyone help?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
swefil2008 is offline Offline
5 posts
since Jul 2008
Jul 2nd, 2008
0

Re: Need help creating printout script from database

you will need to change the print form to look like your paper to be printed on, then the code will need to resemble the $print properties for each line to be printed.

Do a google search for php and pdf print styles
Reputation Points: 13
Solved Threads: 7
Junior Poster in Training
casper_wang is offline Offline
67 posts
since Jul 2008
Jul 2nd, 2008
0

Re: Need help creating printout script from database

Hi thanks for you reply, have checked and maybe in-design may do the job, but collecting the data to be printed may be a problem according to the print script i have, I am a novice when it comes PHP,

Here is the print script that is used just now.
_______________--
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>Print Voucher</title>
</head>
<link rel="stylesheet" href="style.css" type="text/css">
<?php
error_reporting(0);
include_once 'db.php';

if (!isset($db_conn)) {$db_conn = db_open();}
?>

<body>

<form id='frmPrint' name='frmPrint' method="get">
<DIV id='divPrint' name='divPrint'></DIV>
<script><!--
var objPrint = document.getElementById("divPrint");
objPrint.innerHTML = window.opener.document.getElementById("divInvoice").innerHTML;
window.opener.document.getElementById("divInvoice").innerHTML;
//-->
</script>
</form>
______________________
Reputation Points: 10
Solved Threads: 0
Newbie Poster
swefil2008 is offline Offline
5 posts
since Jul 2008
Jul 3rd, 2008
0

Re: Need help creating printout script from database

Swefil:
Give this a try and let us know if it works for you:

http://www.smartform.com/
Reputation Points: 13
Solved Threads: 7
Junior Poster in Training
casper_wang is offline Offline
67 posts
since Jul 2008
Jul 4th, 2008
0

Re: Need help creating printout script from database

Swefil:
Give this a try and let us know if it works for you:

http://www.smartform.com/

Casper, Thanks for the tip, yes it worked like a dream, easy to setup and use, at least we can print our vouchers manually for now, using our database is a problem for at the moment, but I am sure we will be able to in a few days when our programmer comes back and give us the correct fields for input, possibly need to do a double function, first transferring to msaccess db so as to use the obdc function in the software.

Best regards
Swefil
Reputation Points: 10
Solved Threads: 0
Newbie Poster
swefil2008 is offline Offline
5 posts
since Jul 2008
Jul 4th, 2008
0

Re: Need help creating printout script from database

Great, I'm glad you got a work around for the time being. If you need any other assistance don't hesitate to ask.
Last edited by casper_wang; Jul 4th, 2008 at 5:48 am.
Reputation Points: 13
Solved Threads: 7
Junior Poster in Training
casper_wang is offline Offline
67 posts
since Jul 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Please help me to correct php code
Next Thread in PHP Forum Timeline: Populate drop box with case statements





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC