5 Replies Latest reply on Oct 24, 2007 11:03 AM by cepsJane

    use cfdocument to create avery labels

    cepsJane
      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.
        • 1. Re: use cfdocument to create avery labels
          cepsJane Level 1
          Hi there,

          Does anyone has any experiences with cfdocument to generate the labels? Would you please share? Thanks a lot.
          • 2. Re: use cfdocument to create avery labels
            Level 7
            "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.
            • 3. Re: use cfdocument to create avery labels
              cepsJane Level 1
              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.
              • 4. Re: use cfdocument to create avery labels
                Level 7
                "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.

                • 5. Re: use cfdocument to create avery labels
                  cepsJane Level 1
                  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