Need help creating printout script from database

Thread Solved

Join Date: Jul 2008
Posts: 5
Reputation: swefil2008 is an unknown quantity at this point 
Solved Threads: 0
swefil2008 swefil2008 is offline Offline
Newbie Poster

Need help creating printout script from database

 
0
  #1
Jul 2nd, 2008
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?
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 67
Reputation: casper_wang is an unknown quantity at this point 
Solved Threads: 6
casper_wang's Avatar
casper_wang casper_wang is offline Offline
Junior Poster in Training

Re: Need help creating printout script from database

 
0
  #2
Jul 2nd, 2008
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
If I helped in solving your issue please Add to "MY Reputation" and most important: "Mark as solved"
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 5
Reputation: swefil2008 is an unknown quantity at this point 
Solved Threads: 0
swefil2008 swefil2008 is offline Offline
Newbie Poster

Re: Need help creating printout script from database

 
0
  #3
Jul 2nd, 2008
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>
______________________
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 67
Reputation: casper_wang is an unknown quantity at this point 
Solved Threads: 6
casper_wang's Avatar
casper_wang casper_wang is offline Offline
Junior Poster in Training

Re: Need help creating printout script from database

 
0
  #4
Jul 3rd, 2008
Swefil:
Give this a try and let us know if it works for you:

http://www.smartform.com/
If I helped in solving your issue please Add to "MY Reputation" and most important: "Mark as solved"
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 5
Reputation: swefil2008 is an unknown quantity at this point 
Solved Threads: 0
swefil2008 swefil2008 is offline Offline
Newbie Poster

Re: Need help creating printout script from database

 
0
  #5
Jul 4th, 2008
Originally Posted by casper_wang View Post
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
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 67
Reputation: casper_wang is an unknown quantity at this point 
Solved Threads: 6
casper_wang's Avatar
casper_wang casper_wang is offline Offline
Junior Poster in Training

Re: Need help creating printout script from database

 
0
  #6
Jul 4th, 2008
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.
If I helped in solving your issue please Add to "MY Reputation" and most important: "Mark as solved"
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC