By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,490 Members | 1,489 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,490 IT Pros & Developers. It's quick & easy.

Printing Avery Labels from a web site

P: n/a
I am just coming to grips with php, Dreamweaver and MySQL and I want to make
a facility available for the members of the group I am creating my web site
for. I want them to be able to print-out a list of address labels, using
standard Avery labels, on their home PC's using the data from my MySQL
tables. I am not yet sufficiently au fait with php to manage to code it
myself so I wondered if anybody knew of any Dreamweaver extensions, add-ins
or tutorials which would do the trick. I have had a good look at what is on
the web but I can't find very much about it.

Any ideas?
--
(\__/)
(='.'=)
(")_(")
Apr 17 '07 #1
Share this Question
Share on Google+
29 Replies


P: n/a

"FredBear" <Th****************@Yahoo.comwrote in message
news:13*************@corp.supernews.com...
>I am just coming to grips with php, Dreamweaver and MySQL and I want to
make a facility available for the members of the group I am creating my web
site for. I want them to be able to print-out a list of address labels,
using standard Avery labels, on their home PC's using the data from my
MySQL tables. I am not yet sufficiently au fait with php to manage to code
it myself so I wondered if anybody knew of any Dreamweaver extensions,
add-ins or tutorials which would do the trick. I have had a good look at
what is on the web but I can't find very much about it.

Any ideas?
--
(\__/)
(='.'=)
(")_(")
Presumably you just need to create a HTML table to match the dimensions of
the labels, that can then be printed...... as you can specify the column
widths and row heights in cm this should be fairly easy to construct.

Adding code in PHP to create this on the fly from a database would also be
fairly easy, as you are only looping through a recordset to insert the data
into the cells of the table.

Apr 17 '07 #2

P: n/a
Following on from Sean's message. . .
>
Presumably you just need to create a HTML table to match the dimensions of
the labels, that can then be printed...... as you can specify the column
widths and row heights in cm this should be fairly easy to construct.
Is the wrong answer.

Use PDF

--
PETER FOX Not the same since the adhesive company came unstuck
pe******@eminent.demon.co.uk.not.this.bit.no.html
2 Tees Close, Witham, Essex.
Gravity beer in Essex <http://www.eminent.demon.co.uk>
Apr 17 '07 #3

P: n/a

"Peter Fox" <pe******@eminent.demon.co.uk.not.this.bit.no.html wrote in
message news:gO**************@eminent.demon.co.uk...
Following on from Sean's message. . .
>>
Presumably you just need to create a HTML table to match the dimensions of
the labels, that can then be printed...... as you can specify the column
widths and row heights in cm this should be fairly easy to construct.
Is the wrong answer.

Use PDF

--
PETER FOX Not the same since the adhesive company came unstuck
pe******@eminent.demon.co.uk.not.this.bit.no.html
2 Tees Close, Witham, Essex.
Gravity beer in Essex <http://www.eminent.demon.co.uk>
Wrong? ... How?

PDF is an alternative to HTML, I would agree ... and would even concede that
it's a better alternative, IF the guy can find (or be given) the appropriate
code examples to complete the task, but HTML wouldn't be "wrong",
particularly if he's new to the coding that it would take to complete the
job.

Apr 17 '07 #4

P: n/a
Following on from Sean's message. . .
>
"Peter Fox" <pe******@eminent.demon.co.uk.not.this.bit.no.html wrote in
message news:gO**************@eminent.demon.co.uk...
>Following on from Sean's message. . .
>>>
Presumably you just need to create a HTML table to match the dimensions of
the labels, that can then be printed...... as you can specify the column
widths and row heights in cm this should be fairly easy to construct.
Is the wrong answer.

Use PDF

--
PETER FOX Not the same since the adhesive company came unstuck
pe******@eminent.demon.co.uk.not.this.bit.no.html
2 Tees Close, Witham, Essex.
Gravity beer in Essex <http://www.eminent.demon.co.uk>

Wrong? ... How?
Try it yourself and you'll find out.
>
PDF is an alternative to HTML, I would agree ... and would even concede that
it's a better alternative, IF the guy can find (or be given) the appropriate
code examples to complete the task, but HTML wouldn't be "wrong",
particularly if he's new to the coding that it would take to complete the
job.
HTML is not an alternative - it's a crap suggestion by somebody who
doesn't know what they're talking about.

--
PETER FOX Not the same since the exam marking business failed
pe******@eminent.demon.co.uk.not.this.bit.no.html
2 Tees Close, Witham, Essex.
Gravity beer in Essex <http://www.eminent.demon.co.uk>
Apr 17 '07 #5

P: n/a
>>Wrong? ... How?
Try it yourself and you'll find out.
An HTML table to represent a sheet of Avery Labels (with PHP) could be done
in your sleep ... assuming that you have a "basic" knowledge of HTML and
PHP.
>>Use PDF
Even with a PDF format you've still got to create some sort of table or
something in columns to match the layout.
>>PDF is an alternative to HTML, I would agree ... and would even concede
that
it's a better alternative, IF the guy can find (or be given) the
appropriate
code examples to complete the task, but HTML wouldn't be "wrong",
particularly if he's new to the coding that it would take to complete the
job.
HTML is not an alternative - it's a crap suggestion by somebody who
doesn't know what they're talking about.
There's nothing like being constructive ... and that's nothing like
constructive.

Apr 17 '07 #6

P: n/a

"Sean" <sean.anderson@[nospam]oakleafgroup.bizwrote in message
news:11***************@kestrel.skynet.co.uk...
| >>Wrong? ... How?
|
| Try it yourself and you'll find out.
|
| An HTML table to represent a sheet of Avery Labels (with PHP) could be
done
| in your sleep ... assuming that you have a "basic" knowledge of HTML and
| PHP.
|
| >>Use PDF
|
| Even with a PDF format you've still got to create some sort of table or
| something in columns to match the layout.
|
| >>PDF is an alternative to HTML, I would agree ... and would even concede
| >>that
| >>it's a better alternative, IF the guy can find (or be given) the
| >>appropriate
| >>code examples to complete the task, but HTML wouldn't be "wrong",
| >>particularly if he's new to the coding that it would take to complete
the
| >>job.
|
| HTML is not an alternative - it's a crap suggestion by somebody who
| doesn't know what they're talking about.
|
| There's nothing like being constructive ... and that's nothing like
| constructive.

this world is becoming more and more crowded with whining babies! forget the
packaging of the suggestion and take it for what it's worth. PDF is
FORMALIZED, HTML is completely UNDEVELOPED when it comes to PRINTING. you
are 90% certain to have printed what you expect to have printed using
pdf...html is a crap-shoot. grow up and quit being defensive. his suggestion
is SPOT-ON.

and sean...i'm sure the guys at alt.php.sql just fucking L O V E to have
posts thrown their way that have absoFuckingLutely nothing to do with their
context!
Apr 17 '07 #7

P: n/a
On Apr 17, 2:16 pm, "Steve" <no....@example.comwrote:
"Sean" <sean.anderson@[nospam]oakleafgroup.bizwrote in message

news:11***************@kestrel.skynet.co.uk...
| >>Wrong? ... How?
|
| Try it yourself and you'll find out.
|
| An HTML table to represent a sheet of Avery Labels (with PHP) could be
done
| in your sleep ... assuming that you have a "basic" knowledge of HTML and
| PHP.
|
| >>Use PDF
|
| Even with a PDF format you've still got to create some sort of table or
| something in columns to match the layout.
|
| >>PDF is an alternative to HTML, I would agree ... and would even concede
| >>that
| >>it's a better alternative, IF the guy can find (or be given) the
| >>appropriate
| >>code examples to complete the task, but HTML wouldn't be "wrong",
| >>particularly if he's new to the coding that it would take to complete
the
| >>job.
|
| HTML is not an alternative - it's a crap suggestion by somebody who
| doesn't know what they're talking about.
|
| There's nothing like being constructive ... and that's nothing like
| constructive.

this world is becoming more and more crowded with whining babies! forget the
packaging of the suggestion and take it for what it's worth. PDF is
FORMALIZED, HTML is completely UNDEVELOPED when it comes to PRINTING. you
are 90% certain to have printed what you expect to have printed using
pdf...html is a crap-shoot. grow up and quit being defensive. his suggestion
is SPOT-ON.

and sean...i'm sure the guys at alt.php.sql just fucking L O V E to have
posts thrown their way that have absoFuckingLutely nothing to do with their
context!
have a look at FPDF (www.fpdf.org). They have scripts over there for
creating labels, and it's pretty easy to add your own once you figure
it out a bit.

Apr 17 '07 #8

P: n/a
Sean wrote:
>>Wrong? ... How?
>Try it yourself and you'll find out.

An HTML table to represent a sheet of Avery Labels (with PHP) could be done
in your sleep ... assuming that you have a "basic" knowledge of HTML and
PHP.
>>>Use PDF

Even with a PDF format you've still got to create some sort of table or
something in columns to match the layout.
>>PDF is an alternative to HTML, I would agree ... and would even concede
that
it's a better alternative, IF the guy can find (or be given) the
appropriate
code examples to complete the task, but HTML wouldn't be "wrong",
particularly if he's new to the coding that it would take to complete the
job.
>HTML is not an alternative - it's a crap suggestion by somebody who
doesn't know what they're talking about.

There's nothing like being constructive ... and that's nothing like
constructive.
Sean,

The problem with HTML is it is a fluid layout, and he needs an
absolutely fixed one.

For instance, the user may not be using the default font size - on my
laptop with a high res screen, I use a larger than normal font. On my
desktop with it's 21" screen, I use a smaller than normal font. And my
default printer font is not the same.

Also, the printer size probably isn't exactly 8.5"x11" (assuming U.S.).
Most printers have an unprintable margin - and this margin varies in
size. The browser may attempt to shrink the page to fit in the margins,
or it may let the page overflow to the next one.

Lots of things like this can happen when you're using html. You can try
to force some of them - but html is only a *recommendation* on how to
display the page, not a *requirement*. You can't be sure you've got it
right.

A PDF, OTOH, is an exact layout and you can control the look of
everything to a very fine level. It's a much superior way to go when
you need exact placement like this.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Apr 17 '07 #9

P: n/a
Sean kirjoitti:
"Peter Fox" <pe******@eminent.demon.co.uk.not.this.bit.no.html wrote in
message news:gO**************@eminent.demon.co.uk...
>Following on from Sean's message. . .
>>Presumably you just need to create a HTML table to match the dimensions of
the labels, that can then be printed...... as you can specify the column
widths and row heights in cm this should be fairly easy to construct.
Is the wrong answer.

Use PDF

--
PETER FOX Not the same since the adhesive company came unstuck
pe******@eminent.demon.co.uk.not.this.bit.no.html
2 Tees Close, Witham, Essex.
Gravity beer in Essex <http://www.eminent.demon.co.uk>

Wrong? ... How?

PDF is an alternative to HTML, I would agree ... and would even concede that
it's a better alternative, IF the guy can find (or be given) the appropriate
code examples to complete the task, but HTML wouldn't be "wrong",
particularly if he's new to the coding that it would take to complete the
job.
I would agree that pdf in this case would be more suited, since it's
better suited for printing than html. With pdf you can define better the
layout of the print, with html the results aren't as precise. Html is
suitable for publishing material that looks good or at least acceptable
in most media (screen, print, handheld, etc.). When the target medium is
print, then pdf is absolutely the best choice, because it's intended to
be used in printing. Furthermore, pdf is not an alternative to html.
They do have similarities, like they both are ways of presenting a
document, but they are suited for different media.

--
Ra*********@gmail.com

"Wikipedia on vähän niinq internetin raamattu, kukaan ei pohjimmiltaan
usko siihen ja kukaan ei tiedä mikä pitää paikkansa." -- z00ze
Apr 17 '07 #10

P: n/a
Sean wrote:
>HTML is not an alternative - it's a crap suggestion by somebody who
doesn't know what they're talking about.

There's nothing like being constructive ... and that's nothing like
constructive.
Pdf is a better alternative - it's too bad that some people don't have
the communication skills required to say that without sounding like an
ass. But I guess an ass is bigger than a fox and that's what he values.

Mike
Apr 17 '07 #11

P: n/a
| Pdf is a better alternative - it's too bad that some people don't have
| the communication skills required to say that without sounding like an
| ass.

or he spoke his mind - 'ass' being relative to one's own sensitivity...which
i've already stated, more and more skins are thinning every day. buck up! i
believe he said almost word for word, 'pdf is a better alternative'...if no
one else got that because they got their feelings hurt, cry to momma.

jesus christ!

and quit it with the fucking cross posting...do you really think that
alt.php.sql could give a rat's ass about a presentation layer question?!!!
Apr 17 '07 #12

P: n/a
Steve wrote:
| Pdf is a better alternative - it's too bad that some people don't have
| the communication skills required to say that without sounding like an
| ass.

believe he said almost word for word, 'pdf is a better alternative'
What he wrote _exactly_ (you can check it yourself) was
it's a crap suggestion by somebody who doesn't know what
they're talking about.
If you think that's effective communication, then you're no doubt the
same kind of ass.

and quit it with the fucking cross posting...do you really think that
alt.php.sql could give a rat's ass about a presentation layer question?!!!
cry to momma.

Cheers,
Mike
Apr 17 '07 #13

P: n/a
"Michael Daly" <Mi*********@foo.barwrote in message
news:Je******************************@magma.ca...
| Steve wrote:
| | Pdf is a better alternative - it's too bad that some people don't have
| | the communication skills required to say that without sounding like an
| | ass.
| >
| believe he said almost word for word, 'pdf is a better alternative'
|
| What he wrote _exactly_ (you can check it yourself) was

what he wrote _exactly_ (you can check it yourself) was

'Use PDF'

in his first reply.

second reply...
| it's a crap suggestion by somebody who doesn't know what
| they're talking about.

and he's right.

| If you think that's effective communication, then you're no doubt the
| same kind of ass.

let's see, if 'crap' is offensive and 'doesn't know what they're talking
about' is too, would it be best - since everyone is so fucking
think-skinned - to say:

i'm so terrible sorry you're under the impression that html is less
problematic, even advantagous, to use in lieu of pdf. perhaps you simply
have overlooked some very important details that i will outline now...as
others have done, oh dear boy.

BULLSHIT !!! effective communication is like wit; the more direct and simply
stated, the more effective. sorry, sean obviously wants to stay in his
comfort zone by boasting of html, states he doesn't know how to generate
pdf's, yet 'thinks' he can be objective in his opinion without understanding
the benefits/detriments of *both*. THAT is bullshit...which leads to the
truth in:

| it's a crap suggestion by somebody who doesn't know what
| they're talking about.

'crap' by any other name? does sean know what he's talking about?

sorry...fox is right.

| and quit it with the fucking cross posting...do you really think that
| alt.php.sql could give a rat's ass about a presentation layer
question?!!!
|
| cry to momma.

exactly...lead the way, moron!
Apr 18 '07 #14

P: n/a
Michael Daly wrote:
Steve wrote:
>| Pdf is a better alternative - it's too bad that some people don't have
| the communication skills required to say that without sounding like an
| ass.

believe he said almost word for word, 'pdf is a better alternative'

What he wrote _exactly_ (you can check it yourself) was
it's a crap suggestion by somebody who doesn't know what
they're talking about.

If you think that's effective communication, then you're no doubt the
same kind of ass.

>and quit it with the fucking cross posting...do you really think that
alt.php.sql could give a rat's ass about a presentation layer
question?!!!

cry to momma.

Cheers,
Mike
Mike,

Don't worry about the reject from alt.anal.orifices. He's just a troll.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Apr 18 '07 #15

P: n/a
Thanks for all the input, People, but I am now running out of the will to
live reading through it all so I have devised a new strategy.

I am going to do a mail merge in MS Word and upload it to my web site each
time I add a new name to the database.

The users can then print their Avery address labels straight from the Word
Document. Not an entirely elegant solution but one which will work.
(\__/)
(='.'=)
(")_(")

Apr 18 '07 #16

P: n/a
On Apr 18, 12:09 pm, "FredBear" <ThisIsNotMyAddr...@Yahoo.comwrote:
Thanks for all the input, People, but I am now running out of the will to
live reading through it all so I have devised a new strategy.

I am going to do a mail merge in MS Word and upload it to my web site each
time I add a new name to the database.

The users can then print their Avery address labels straight from the Word
Document. Not an entirely elegant solution but one which will work.

(\__/)
(='.'=)
(")_(")
Funny you should mention mail merge.
You can in fact mail merge into Word with a direct connection to a
MySQL database on the web. The MySQL database just replaces the Excel
Sheet or Access DB. I'll try to root out an example of this as I have
successfully managed this in the past.

Apr 18 '07 #17

P: n/a
Message-ID: <11*********************@y80g2000hsf.googlegroups. comfrom
Captain Paralytic contained the following:
>Funny you should mention mail merge.
You can in fact mail merge into Word with a direct connection to a
MySQL database on the web. The MySQL database just replaces the Excel
Sheet or Access DB. I'll try to root out an example of this as I have
successfully managed this in the past.
I could use that...

--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011
Apr 18 '07 #18

P: n/a
On Apr 18, 2:37 pm, Geoff Berrow <blthe...@ckdog.co.ukwrote:
Message-ID: <11*********************@y80g2000hsf.googlegroups. comfrom
Captain Paralytic contained the following:
Funny you should mention mail merge.
You can in fact mail merge into Word with a direct connection to a
MySQL database on the web. The MySQL database just replaces the Excel
Sheet or Access DB. I'll try to root out an example of this as I have
successfully managed this in the past.

I could use that...

--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011
I'll have a poke around this evening and if I can find it I'll pop it
up on the web somewhere.

Apr 18 '07 #19

P: n/a
Geof,

Have a look at:
http://torque.oncloud8.com/archives/000160.html

I just tried it out and it works fine.

"Geoff Berrow" <bl******@ckdog.co.ukwrote in message
news:sn********************************@4ax.com...
Message-ID: <11*********************@y80g2000hsf.googlegroups. comfrom
Captain Paralytic contained the following:
>>Funny you should mention mail merge.
You can in fact mail merge into Word with a direct connection to a
MySQL database on the web. The MySQL database just replaces the Excel
Sheet or Access DB. I'll try to root out an example of this as I have
successfully managed this in the past.

I could use that...

--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011

Apr 18 '07 #20

P: n/a
for. I want them to be able to print-out a list of address labels, using
standard Avery labels, on their home PC's using the data from my MySQL
tables. I am not yet sufficiently au fait with php to manage to code it
After all the flames have died down:

Perhaps absolutely positioned divs? If you get the sizes and
proportions right, then it's just a matter of setting the margins
properly in the browser.

Simpler still (maybe even simpler than your Word / mail merge
solution): Find or create a template in Excel for your labels. In
all the cells, put in formulas pointing to the second sheet. On the
second sheet create an external data source that pulls from an html
table. The html table is dynamicly generated by php and holds your
data. It doesn't matter what the formatting of the table is, all the
formatting is done in excel. To get a new list of labels, in Excel
right click in the external data source and click "refresh". Easy.

Aerik
Apr 19 '07 #21

P: n/a
Aerik wrote:
>for. I want them to be able to print-out a list of address labels, using
standard Avery labels, on their home PC's using the data from my MySQL
tables. I am not yet sufficiently au fait with php to manage to code it

After all the flames have died down:

Perhaps absolutely positioned divs? If you get the sizes and
proportions right, then it's just a matter of setting the margins
properly in the browser.
Doesn't work. You don't know the characteristics of the printer (i.e.
margins, etc.).

A 1/2 inch top or bottom margin makes a big difference on a 2"x3"
mailing label.
Simpler still (maybe even simpler than your Word / mail merge
solution): Find or create a template in Excel for your labels. In
all the cells, put in formulas pointing to the second sheet. On the
second sheet create an external data source that pulls from an html
table. The html table is dynamicly generated by php and holds your
data. It doesn't matter what the formatting of the table is, all the
formatting is done in excel. To get a new list of labels, in Excel
right click in the external data source and click "refresh". Easy.

Aerik

Same problem.

HTML is a recommendation only. It is not suited for exact positioning
like the op requires.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Apr 20 '07 #22

P: n/a
Jerry Stuckle <js*******@attglobal.netwrote in
news:CJ******************************@comcast.com:

HTML is a recommendation only. It is not suited for exact positioning
like the op requires
No doubt about it, PDF is the way to go. I've had to go through this exact
scenario, and quickly came to the conclusion that generating a PDF to be
printed on labels is far, far superior than trying to get it right with CSS
for print.

Creating PDFs in PHP is dead easy. Once you figure out where on the page
your labels are, you just run a loop!

Dead simple, quick, and always the right size.
Apr 20 '07 #23

P: n/a
On Tue, 17 Apr 2007 20:01:26 -0500, "Steve" <no****@example.com>
wrote:
>"Michael Daly" <Mi*********@foo.barwrote in message
news:Je******************************@magma.ca. ..
| Steve wrote:
| | Pdf is a better alternative - it's too bad that some people don't have
| | the communication skills required to say that without sounding like an
| | ass.
| >
| believe he said almost word for word, 'pdf is a better alternative'
|
| What he wrote _exactly_ (you can check it yourself) was

what he wrote _exactly_ (you can check it yourself) was

'Use PDF'

in his first reply.

second reply...
| it's a crap suggestion by somebody who doesn't know what
| they're talking about.

and he's right.

| If you think that's effective communication, then you're no doubt the
| same kind of ass.

let's see, if 'crap' is offensive and 'doesn't know what they're talking
about' is too, would it be best - since everyone is so fucking
think-skinned - to say:

i'm so terrible sorry you're under the impression that html is less
problematic, even advantagous, to use in lieu of pdf. perhaps you simply
have overlooked some very important details that i will outline now...as
others have done, oh dear boy.

BULLSHIT !!! effective communication is like wit; the more direct and simply
stated, the more effective. sorry, sean obviously wants to stay in his
comfort zone by boasting of html, states he doesn't know how to generate
pdf's, yet 'thinks' he can be objective in his opinion without understanding
the benefits/detriments of *both*. THAT is bullshit...which leads to the
truth in:

| it's a crap suggestion by somebody who doesn't know what
| they're talking about.

'crap' by any other name? does sean know what he's talking about?

sorry...fox is right.

| and quit it with the fucking cross posting...do you really think that
| alt.php.sql could give a rat's ass about a presentation layer
question?!!!
|
| cry to momma.

exactly...lead the way, moron!
We must all hope you get better quite soon.
Robear Dyer (PA Bear)
MS MVP-Windows (IE, OE, Security, Shell/User)
AumHa VSOP & Admin; DTS-L.org
Apr 20 '07 #24

P: n/a
| >| and quit it with the fucking cross posting...do you really think that
| >| alt.php.sql could give a rat's ass about a presentation layer
| >question?!!!
| >|
| >| cry to momma.
| >
| >exactly...lead the way, moron!
| >
|
| We must all hope you get better quite soon.
| Robear Dyer (PA Bear)

oh robear...yet another. lest i say it again, the opportunists who show up
at a feeding frenzy come bearing teeth. i believe you left your too, in the
small cup of water on the sink in your bathroom. not only did you leave your
teeth, you are how many days late? this thread has been dead for quite some
time. does that mean you only eat off scraps? no, i imagine you are a bottom
feeder - requiring neither teeth nor timing.

:)
Apr 20 '07 #25

P: n/a
Jerry Stuckle <js*******@attglobal.netwrote:
>Aerik wrote:
>>
Perhaps absolutely positioned divs? If you get the sizes and
proportions right, then it's just a matter of setting the margins
properly in the browser.

Doesn't work. You don't know the characteristics of the printer (i.e.
margins, etc.).

A 1/2 inch top or bottom margin makes a big difference on a 2"x3"
mailing label.
...
HTML is a recommendation only. It is not suited for exact positioning
like the op requires.
Yes, and that's really too bad. HTML is probably 90% of the way to being
the ideal reporting solution. With the flexibility and precision available
in CSS, it wouldn't take very much to allow it to compete with PDF for most
scenarios.

As it is, however, there's just no chance.
--
Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Apr 21 '07 #26

P: n/a
Tim Roberts wrote:
Jerry Stuckle <js*******@attglobal.netwrote:
>Aerik wrote:
>>Perhaps absolutely positioned divs? If you get the sizes and
proportions right, then it's just a matter of setting the margins
properly in the browser.
Doesn't work. You don't know the characteristics of the printer (i.e.
margins, etc.).

A 1/2 inch top or bottom margin makes a big difference on a 2"x3"
mailing label.
...
HTML is a recommendation only. It is not suited for exact positioning
like the op requires.

Yes, and that's really too bad. HTML is probably 90% of the way to being
the ideal reporting solution. With the flexibility and precision available
in CSS, it wouldn't take very much to allow it to compete with PDF for most
scenarios.

As it is, however, there's just no chance.
And I'm glad there isn't. HTML is made to be a language for flexible
layouts. PDF is mean to be a fixed layout.

If you want your pages to automatically adjust to different window
sizes, HTML is the way to go. But if you want to ensure everyone sees
exactly the same thing, you should use PDF's.

As a webmaster, I prefer my pages adapt themselves to the user's display.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Apr 22 '07 #27

P: n/a
>
Perhaps absolutely positioned divs? If you get the sizes and
proportions right, then it's just a matter of setting the margins
properly in the browser.

Doesn't work. You don't know the characteristics of the printer (i.e.
margins, etc.).

A 1/2 inch top or bottom margin makes a big difference on a 2"x3"
mailing label.
Simpler still (maybe even simpler than your Word / mail merge
solution): Find or create a template in Excel for your labels. In
all the cells, put in formulas pointing to the second sheet. On the
second sheet create an external data source that pulls from an html
table. The html table is dynamicly generated by php and holds your
data. It doesn't matter what the formatting of the table is, all the
formatting is done in excel. To get a new list of labels, in Excel
right click in the external data source and click "refresh". Easy.
Aerik

Same problem.

HTML is a recommendation only. It is not suited for exact positioning
like the op requires.
Wait a minute - having done several implementations of exactly what I
described above (web data into excel for printing) - what do you mean,
"same problem"? Certainly in html there are a bunch of variables
besides the absolutely positioned divs to deal with, but I think it's
reasonable to assume the user can manage the margins in their print
setup - if not, then they're probably not equiped to load label stock
into their printer. I think the PDF is a fine suggestion, but the
level of complexity is not insignivficant (at least with the few pdf
libraries I've looked at). You've gotta learn the pdf class, get your
data into it into whatever font you choose, and get it positioned
right. Dumping it into any old html table and importing it into excel
is a piece of cake. Maybe not the *best* solution, but probably the
*simplest*.

Aerik

Apr 22 '07 #28

P: n/a
On Apr 22, 9:18 am, Aerik <asyl...@gmail.comwrote:
Perhaps absolutely positioned divs? If you get the sizes and
proportions right, then it's just a matter of setting the margins
properly in the browser.
Doesn't work. You don't know the characteristics of the printer (i.e.
margins, etc.).
A 1/2 inch top or bottom margin makes a big difference on a 2"x3"
mailing label.
Simpler still (maybe even simpler than your Word / mail merge
solution): Find or create a template in Excel for your labels. In
all the cells, put in formulas pointing to the second sheet. On the
second sheet create an external data source that pulls from an html
table. The html table is dynamicly generated by php and holds your
data. It doesn't matter what the formatting of the table is, all the
formatting is done in excel. To get a new list of labels, in Excel
right click in the external data source and click "refresh". Easy.
Aerik
Same problem.
HTML is a recommendation only. It is not suited for exact positioning
like the op requires.

Wait a minute - having done several implementations of exactly what I
described above (web data into excel for printing) - what do you mean,
"same problem"? Certainly in html there are a bunch of variables
besides the absolutely positioned divs to deal with, but I think it's
reasonable to assume the user can manage the margins in their print
setup - if not, then they're probably not equiped to load label stock
into their printer. I think the PDF is a fine suggestion, but the
level of complexity is not insignivficant (at least with the few pdf
libraries I've looked at). You've gotta learn the pdf class, get your
data into it into whatever font you choose, and get it positioned
right. Dumping it into any old html table and importing it into excel
is a piece of cake. Maybe not the *best* solution, but probably the
*simplest*.

Aerik
In that case I'd be interested to see a sample application

Apr 22 '07 #29

P: n/a
Aerik wrote:
>>Perhaps absolutely positioned divs? If you get the sizes and
proportions right, then it's just a matter of setting the margins
properly in the browser.
Doesn't work. You don't know the characteristics of the printer (i.e.
margins, etc.).

A 1/2 inch top or bottom margin makes a big difference on a 2"x3"
mailing label.
>>Simpler still (maybe even simpler than your Word / mail merge
solution): Find or create a template in Excel for your labels. In
all the cells, put in formulas pointing to the second sheet. On the
second sheet create an external data source that pulls from an html
table. The html table is dynamicly generated by php and holds your
data. It doesn't matter what the formatting of the table is, all the
formatting is done in excel. To get a new list of labels, in Excel
right click in the external data source and click "refresh". Easy.
Aerik
Same problem.

HTML is a recommendation only. It is not suited for exact positioning
like the op requires.

Wait a minute - having done several implementations of exactly what I
described above (web data into excel for printing) - what do you mean,
"same problem"? Certainly in html there are a bunch of variables
besides the absolutely positioned divs to deal with, but I think it's
reasonable to assume the user can manage the margins in their print
setup - if not, then they're probably not equiped to load label stock
into their printer. I think the PDF is a fine suggestion, but the
level of complexity is not insignivficant (at least with the few pdf
libraries I've looked at). You've gotta learn the pdf class, get your
data into it into whatever font you choose, and get it positioned
right. Dumping it into any old html table and importing it into excel
is a piece of cake. Maybe not the *best* solution, but probably the
*simplest*.

Aerik
I would absolutely love to see you print Avery labels on any printer
using just HTML. And BTW - I don't have Excel available, so I can't
import it. I do have Adobe Reader available, however, on my Linux system.

It's quite easy to do in a pdf. And I haven't found pdf classes that
complicated. A little studying and I was able to easily create a PDF
form for one of my clients with fpdf.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Apr 22 '07 #30

This discussion thread is closed

Replies have been disabled for this discussion.