• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

use cfdocument to create avery labels

New Here ,
Oct 22, 2007 Oct 22, 2007

Copy link to clipboard

Copied

Hi there,

I am trying to use cfdocument to generate Avery labels for a abel printer. Basically I query the db and write the data to the pdf. The cfdocument tag I am using is:
<cfdocument format="pdf" unit="in" margintop="0.05" marginbottom="0" marginleft="0" marginright="0" pagetype="custom" pagewidth="2.5" pageheight="2" fontembed="yes" orientation="portrait" scale="100">

My problem is the name and the mailing address are displayed from the middle of the label and the address line get saperated into two lines even though these are still a lot of spaces left on the first line of address. I have specified the marginleft="0" and marginright="0" but they did not work.

Any ideas? Thanks a lot.
TOPICS
Advanced techniques

Views

1.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 23, 2007 Oct 23, 2007

Copy link to clipboard

Copied

Hi there,

Does anyone has any experiences with cfdocument to generate the labels? Would you please share? Thanks a lot.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 23, 2007 Oct 23, 2007

Copy link to clipboard

Copied

"Does anyone has any experiences with cfdocument to generate the labels?
Would you please share? Thanks a lot."

I do not have any cfdocument experience, but several years ago I did
some avery label work with basic html tables based on an old ColdFusion
Developer Journal article. I would think it should be fairly trivial to
wrap one of these tables into a cfdocument.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 23, 2007 Oct 23, 2007

Copy link to clipboard

Copied

Hi Ian, Thanks for sharing the info. It is my first time to use cfdocument. I need to generate a few letters and mailing labels for the letters. I was thinking to use cf report builder, however, the report builder runs only on windows if I understand correctly and my coldfusion server runs linux. So I dont' have other ideas for reporting besides using cfdocument.

My label printer prints a label at a time. What I am doing is basically customize the pdf with the mailing address using cfdocument to fit in the Avery label. But the mailing address just squeezed in the middle.

Any help or suggestions will be appreciated.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 23, 2007 Oct 23, 2007

Copy link to clipboard

Copied

"I was thinking to use cf report builder, however, the report builder
runs only on windows if I understand correctly and my coldfusion server
runs linux."

You say your server is Linux, what is your workstation? Yes, the report
builder (the IDE for building reports) currently only runs on Windows.
But the reports themselves, once built, can be installed and accessed on
any server supported by ColdFusion. So if your workstation is a windows
machine you can use this option if you like.

The cfdocument tag basically takes a HTML page, wraps it up and spits
out a PDF (and other formated) document with some other printing type
options. The CFDJ, back when it was decent, article I am referring to
was how to make a basic HTML table based layout for generating Avery
labels. It should then follow that wrapping this in a <cfdocument...>
should also work. This may or may not give you more functionality and
control, I do not know.

Unfortunately it has been many years and a couple of job offers since I
did anything like this so I can not give any specific examples or code
hints. Hopefully Google will be generous.

I have a vague memory of possibly using MS Word's Avery label feature as
a staring point? That you exported the Word Avery template to HTML and
started from there. I am not sure. This may have been before Word was
as bad as it is now with extraneous HTML markup.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 24, 2007 Oct 24, 2007

Copy link to clipboard

Copied

LATEST
HI Ian, thanks a lot for your clarification on using the report builder. All my workstations are windows. So it is nice to know that I have report builder option. However I am wondering if using the report builder without IDE feature may need a lot of more work.

Again thanks for your suggestions on generating the Avery labels. Starting from HTML table based layout for generating Avery seems a good idea.
labels

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation