Searching \ for '[EE] Website automatic pdf generation with barcode' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=website+automatic
Search entire site for: 'Website automatic pdf generation with barcode'.

Exact match. Not showing close matches.
PICList Thread
'[EE] Website automatic pdf generation with barcode'
2012\04\28@124456 by Carlos Marcano

picon face
Hi all,

This is a long shot but I'm still giving it a try.

We are needing to send an email to a few hundread of customers announcing
some sort of promo; they would receive a link which should go to our
website and generate a pdf with a random barcode or just a long number on
it which we also need to keep track of, that is, we need to know which
barcodes or numbers are being generated and "assigned" to each customer as
then when they use their printed pdf to redeem the object of the promo we
can be sure that each customer only uses the code once.

So, this is kind of two or three questions in one:

* Need to generate random code and pasted it in a document.
* Keep a list of generated codes.
* Create the pdf for the customer to make a hardcopy of the document.

So, I know this might not be the adecuate list to ask this but I really
dont know a better list to ask to!

Thanks in advance!

Regards,

Carlos

2012\04\28@130051 by alan.b.pearce

face picon face
> So, this is kind of two or three questions in one:
>
> * Need to generate random code and pasted it in a document.
> * Keep a list of generated codes.
> * Create the pdf for the customer to make a hardcopy of the document.

You could do a barcode, but I would also look at printing a number in an OCR font.
IIRC OCR1 is the font across the bottom of checks, but OCR2 is a much nicer looking font, but again designed to be machine readable with a minimum of errors.

-- Scanned by iCritical.

2012\04\28@132427 by mcd

flavicon
face
I'm not exactly sure where the question is here.  You say:

> So, this is kind of two or three questions in one:
>
> * Need to generate random code and pasted it in a document.
> * Keep a list of generated codes.
> * Create the pdf for the customer to make a hardcopy of the document.

These are all relatively straightforward things to do on a website. Pretty much any server-side language can connect to a database where you
can keep track of things, PHP at least has a quite adequate PDF library,
I'm sure most of the other platforms do too.

So what exactly is the question?  Are you looking for code examples? Off
the shelf software?  A contractor?

--McD

2012\04\28@150014 by Carlos Marcano

picon face
2012/4/28 <spam_OUTmcdTakeThisOuTspamis-sixsigma.com>

> I'm not exactly sure where the question is here.  You say:
>
> > So, this is kind of two or three questions in one:
> >
> > * Need to generate random code and pasted it in a document.
> > * Keep a list of generated codes.
> > * Create the pdf for the customer to make a hardcopy of the document.
>
>
You are right, I was vague.


> These are all relatively straightforward things to do on a website.
> Pretty much any server-side language can connect to a database where you
> can keep track of things, PHP at least has a quite adequate PDF library,
> I'm sure most of the other platforms do too.
>
> So what exactly is the question?  Are you looking for code examples? Off
> the shelf software?  A contractor?
>
>
Off the shelf software (open sourced prefered) would be 1st option.

Code examples for PHP could be a second choice.

Thanks in advance.

Regards,

Carlos.



> --McD
>
>
>

2012\04\28@164137 by mcd

flavicon
face
part 1 1894 bytes content-type:text/plain; charset="iso-8859-1" (decoded quoted-printable)

> Code examples for PHP could be a second choice.

I don't have a line on any off the shelf FOSS applications, although I
bet there is something out there.  I use a PHP script to generate a
monthly report as a PDF.

I use a PDF class for PHP but it appears it has been updated since I
downloaded it many moons ago.  It looks to be at http://ros.co.nz/pdf/
but mine relies on fpdf, which also seems to be around, but it looks
like the current version doesn't.  So my examples might not be all
that useful.

I was going to include the stuff I use but the zip is a bit large for
this list.  Besides the actual class there are a few fonts which take
plenty of space.

I've attached a sample which I've hacked up some.  I use this monthly
to generate a report.  I've taken important bits from the include
files and pasted them into it, and left out uninteresting functions.
Kinda grunty and maybe hard to follow, but it should contain an
example of almost everything you might want to do.

I assume you know how to do the database stuff.

For the PDF

 $PageSize = array(0,0,$Page_Width,$Page_Height);
 $pdf = & new Cpdf($PageSize);
 $pdf->SetTextColor(0,0,0);
 $pdf->selectFont('helvetica-Bold');
 $FontSize=18;

 $pdf->addText($XPos,$YPos,$FontSize,_('blah, blah, blah'));
 // and do that a bunch of times

then

 $buf = $pdf->output();
 $len += strlen($buf);

 header('Content-type: application/pdf');
 header('Content-Length: ' . $len);
 header('Content-Disposition: inline; filename=' . $DateShort . '-rpt.pdf');
 header('Expires: 0');
 header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
 header('Pragma: public');

 $pdf->stream()

?>

Yeah, all the text positioning can get kinda grody, but it does work.
The example has functions for a new page, header, etc.

Hope that helps.

--McD


part 2 9438 bytes content-type:application/x-php; name="example.php" (decode)

part 3 181 bytes content-type:text/plain; name="ATT00001.txt"
(decoded base64)

--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
mailman.mit.edu/mailman/listinfo/piclist

2012\04\28@170325 by Carlos Marcano

picon face
Thanks, I'll give it a look

C.

2012/4/28 <.....mcdKILLspamspam@spam@is-sixsigma.com>

{Quote hidden}

>

More... (looser matching)
- Last day of these posts
- In 2012 , 2013 only
- Today
- New search...