0% found this document useful (0 votes)
62 views

Report PHP

The document describes a micro project to develop a barcode generator using PHP. It outlines the aims, methodology, resources used and outputs of the project. It also provides the code and details of the group members who worked on the project.

Uploaded by

So
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views

Report PHP

The document describes a micro project to develop a barcode generator using PHP. It outlines the aims, methodology, resources used and outputs of the project. It also provides the code and details of the group members who worked on the project.

Uploaded by

So
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Department Of Computer Engineering

Puranmal Lahoti Government Polytechnic, Latur

(Institute of technology in Latur, Maharashtra)

Year:2023-24

Course Title: PROGRAMMING WITH PYTHON

Course code: 22616


Micro project Title: BARCODE GENERATOR
Roll
Sr.No. Name of Group members Enrollment no. no.

1 Surwase Akhil Dyaneshwar 2100160196 56

2 Kamble Vaibhav Suresh 2200160031 58

3 Kshisagar Pruthviraj Dattatray 2200160032 59

4 Dhole Rameshwar Chandrashekhar 2100160151 60

Under the guidance of


Prof. R.D.Kasar Madam
Prof. A.M. Mundada Madam
Maharashtra State Board of Technical Education
Certificate
This is to certify that the project report entitled BARCODE
GENERATOR is completed by the Third Year-Fifth semester
students of the Diploma in Computer Engineering Of the Institute

Roll
Sr.No. Name of Group members Enrollment no. no.

1 Surwase Akhil Dyaneshwar 2100160196 56

2 Kamble Vaibhav Suresh 2200160031 58

3 Kshisagar Pruthviraj Dattatray 2200160032 59

4 Dhole Rameshwar Chandrashekhar 2100160151 60

Puranmal Lahoti Government Polytechnic Latur (Code…0016….)


has completed the term work satisfactorily in the course Web Based
Application Development with PHP for the Academic Year 2023.to 2024 as
prescribed in the curriculum.

Subject Teacher. Head of Department. Principle

Prof. T.P.Sharma S.V.Chavan V.V.Nitnawre


Part – A Micro Project

TITLE: BARCODE GENERATOR


1.0. AIM/benefits of micro project
• The micro project aims to develop a barcode generator using PHP,
which will enable users to generate barcode images dynamically.
The benefits of this micro project include
• Providing a tool for generating barcodes on the fly, which can be
useful in various applications such as inventory management, retail,
ticketing systems, etc.
• Enhancing knowledge and understanding of PHP programming
language.
• Developing skills in handling dynamic image generation and
manipulation.

2.0 Course Outcomes Addressed


• This micro project addresses the following course outcomes:
• Understanding of PHP programming concepts.
• Ability to manipulate dynamic content generation.
• Understanding of image processing and manipulation
techniques.
• Practical implementation of algorithms for barcode generation.
3.0. Proposed Methodology:
• Research and understand the basics of barcode generation
algorithms.
• Develop PHP scripts to generate barcode images dynamically.
• Implement necessary user interfaces for inputting data and
displaying generated barcodes.
• Test the barcode generator under various scenarios to ensure
functionality and reliability.
• Document the code and provide necessary instructions for usage.

4. Group members

Roll
Sr.No. Name of Group members Enrollment no. no.

1 Surwase Akhil Dyaneshwar 2100160196 56

2 Kamble Vaibhav Suresh 2200160031 58

3 Kshisagar Pruthviraj Dattatray 2200160032 59

4 Dhole Rameshwar Chandrashekhar 2100160151 60


5. Action Plan:

Activity Name of
Details of activity Activity start complete Responsible
Date date member

Project Initiation 25-8-23 30-8-23 Surwase Akhil

Information Collection 31-8-23 10-9-23 Kamble Vaibhav

Implementation 10-9-23 1-10-23 Kshirsagar Prithviraj

Dhole
Report 1-10-23 20-10-23 Rameshwar

6.0 Resources Required:

Sr.no Name of Resources Specification Qty

1 Internet Google 1

2 Reference books Techknowledge 1


Part – B Micro-Project Report
TITLE: BARCODE GENERATOR

1.0 Rationale:
• The rationale behind choosing PHP for barcode generation lies in
its widespread usage for web development and its capability to
handle dynamic content generation efficiently. PHP provides
libraries and functions for image manipulation, making it suitable
for implementing barcode generation algorithms.

2.0 Aims /benefit of the Micro-Project:

• Providing a tool for generating barcodes on the fly, which can be useful in
various applications such as inventory management, retail, ticketing systems,
etc.
• Enhancing knowledge and understanding of PHP programming language.
• Developing skills in handling dynamic image generation and manipulation.
• Understanding the principles of barcode generation and its practical
implementation using PHP.

3.0 Course Outcomes Addressed:


• Understanding of PHP programming concepts.
• Ability to manipulate dynamic content generation.
• Understanding of image processing and manipulation
techniques.
• Practical implementation of algorithms for barcode
generation.
4.0 Literature Review:
• Various libraries and resources are available for barcode generation
in PHP. Some popular libraries include:
• TCPDF: A PHP library for generating PDF documents, which also
supports barcode generation.
• Zend Barcode: A component of Zend Framework for generating
barcodes in various formats.
• PHP Barcode Generator: A standalone library specifically designed
for generating barcodes in PHP applications.

5.0. Actual procedure followed:


• Researching barcode generation algorithms and PHP libraries.
• Choosing a suitable approach and library for implementation.
• Writing PHP scripts to handle input data and generate barcode
images using the selected library.
• Testing the barcode generator for functionality and performance.
• Refining the code and optimizing it for better efficiency.

6.0 Actual Resources Used:

Sr.no Name of Resources Specification Qty

1 Internet Google, Chrome 1

2 Reference Books TechKnowledge 1


7.0 Outputs of the Micro-Projects:
• A functional barcode generator implemented in PHP.
• Documentation explaining the usage and implementation details.
• Sample barcode images generated using the tool.
• Improved understanding and skills in PHP programming, image
manipulation, and barcode generation.

8.0 Skill Developed / Learning Outcome of this Micro-Project

• Proficiency in PHP programming language.


• Understanding of barcode generation algorithms and techniques.
• Ability to manipulate and generate images dynamically using PHP.
• Problem-solving skills in implementing complex functionalities.
• Documentation skills for explaining code and usage instructions
effectively.

9.0 Applications of this Micro-Project:


• Shopping and Stock Control: Helps shops and businesses keep
track of products by creating barcodes for them. This makes it
easier to manage inventory and sales.
• Online Shopping: Websites can use it to create barcodes for
products they sell. This makes the ordering process smoother and
ensures the right items are sent to customers.
• Ticketing: Used for generating barcodes on tickets for events like
concerts or transportation services. It speeds up entry and reduces
the chances of counterfeit tickets.
• Library Organization: Libraries can create barcodes for books,
making it easier to check them out and return them accurately.
10.0 Group Member

Roll
Sr.No. Name of Group members Enrollment no. no.

1 Surwase Akhil Dyaneshwar 2100160196 56

2 Kamble Vaibhav Suresh 2200160031 58

3 Kshisagar Pruthviraj Dattatray 2200160032 59

4 Dhole Rameshwar Chandrashekhar 2100160151 60

Code used: -
<?php

?>

<style>

div.b128{

border-left: 1px black solid;

height: 30px;

</style>
<?php

global $char128asc,$char128charWidth;

$char128asc=' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRS
TUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~';

$char128wid = array(

'212222','222122','222221','121223','121322','131222','122213','122312','132212','22
1213', // 0-9

'221312','231212','112232','122132','122231','113222','123122','123221','223211','22
1132', // 10-19

'221231','213212','223112','312131','311222','321122','321221','312212','322112','32
2211', // 20-29

'212123','212321','232121','111323','131123','131321','112313','132113','132311','21
1313', // 30-39

'231113','231311','112133','112331','132131','113123','113321','133121','313121','21
1331', // 40-49

'231131','213113','213311','213131','311123','311321','331121','312113','312311','33
2111', // 50-59

'314111','221411','431111','111224','111422','121124','121421','141122','141221','112
214', // 60-69

'112412','122114','122411','142112','142211','241211','221114','413111','241112','13
4111', // 70-79

'111242','121142','121241','114212','124112','124211','411212','421112','421211','21
2141', // 80-89

'214121','412121','111143','111341','131141','114113','114311','411113','411311','113
141', // 90-99

'114131','311141','411131','211412','211214','211232','23311120' ); // 100-106
////Define Function

function bar128($text) { // Part 1, make list of widths

global $char128asc,$char128wid;

$w = $char128wid[$sum = 104]; // START symbol

$onChar=1;

for($x=0;$x<strlen($text);$x++) // GO THRU TEXT GET LETTERS

if (!( ($pos = strpos($char128asc,$text[$x])) === false )){ // SKIP NOT FOUND


CHARS

$w.= $char128wid[$pos];

$sum += $onChar++ * $pos;

$w.= $char128wid[ $sum % 103 ].$char128wid[106]; //Check Code, then END

//Part 2, Write rows

$html="<table cellpadding=0 cellspacing=0><tr>";

for($x=0;$x<strlen($w);$x+=2) // code 128 widths: black border, then white space

$html .= "<td><div class=\"b128\" style=\"border-left-


width:{$w[$x]};width:{$w[$x+1]}\"></div></td>";

return "$html<tr><td colspan=".strlen($w)." align=left><font family=arial


size=2>$text</td></tr></table>";

?>
<html>

<head>

<style>

p.inline {display: inline-block;}

span { font-size: 13px;}

</style>

<style type="text/css" media="print">

@page

size: auto; /* auto is the initial value */

margin: 0mm; /* this affects the margin in the printer settings */

</style>

</head>

<body onload="window.print();">

<div style="margin-left: 5%">

<?php

include 'barcode128.php';

$product = $_POST['product'];

$rate = $_POST['rate'];
for($i=1;$i<=$_POST['print_qty'];$i++){

echo "<p class='inline'><span ><b>Item:


$product</b></span>".bar128(stripcslashes($_POST['product_id']))."<span
><b>Price: ".$rate." </b><span></p>&nbsp&nbsp&nbsp&nbsp";

?>

</div>

</body>

</html>
Output: -

You might also like