Re: PDF mailing labels
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 26150
interpreted = N
texte = On 1/13/00 3:34 pm, Conley Hanson so noted...>I'm trying to write a template that will print out mailing labels for>various list.>>[writefile file=avery.pdf&secure=f]>[include file=avery_template.pdf&[search>db=list.db&eqmail_typedatarq=client][foundItems]__line1[index]=[name]&__li>ne2[index]=[address1]&__line3[index]=[address2]&__line4[index]=[city]&[/fo>undItems][/search]][/writefile]>>[redirect [serverPath]/avery.pdf]>>This works great for the first 30 names on the list, but I need labels>for the next thrity as well.You're going to have to modify the avery_template.pdf file to generate a multi-page pdf.Essentially, you'll have to take everything between 2 0 obj and endobj and duplicate it in a loop for each set of 30 names with a unique number for each object (since all the low numbers are taken, you may want to start numbering at 20 -- ie 20 0 obj 21 0 obj etc).Page count is set near the bottom of the file. Say you had created three pages (obj 20-22) in the step above. You'd have to code your template (using another loop) to replace what's currently in 1 0 obj and 7 0 obj with something like this (1 0 obj renamed to 50+, again to avoid conflicts):50 0 obj<</Type /Page/Parent 7 0 R/Resources 3 0 R/Contents 20 0 R>>endobj51 0 obj<</Type /Page/Parent 7 0 R/Resources 3 0 R/Contents 21 0 R>>endobj52 0 obj<</Type /Page/Parent 7 0 R/Resources 3 0 R/Contents 22 0 R>>endobj7 0 obj<</Type /Pages/Kids [50 0 R 51 0 R 52 0 R]/Count 3/MediaBox [0 0 612 792]>>endobjYou can see how /Kids references the objects that hold /Contents that refer to your page objects. Acrobat is pretty cool in this regard. If you had some fancy graphic on each of your labels it would just have to be included in the pdf file *once,* then referenced (with transforms for the position) for each place it appears. For this three page file, that's encoding one graphic instead of 90 in the file.Adobe's PDF specification guide is available below. Always a worthwhile browse before beginning any PDF projects : )http://partners.adobe.com/asn/developer/acrosdk/DOCS/pdfspec.pdfRob MarquardtDesigner/Resident WireheadToast Design800 Washington Avenue NorthMinneapolis MN 55401612.330.9863 v612.321.9424 fwww.toastdesign.com-------------------------------------------------------------Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.To end your Mail problems go to
.This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to
Associated Messages, from the most recent to the oldest:
On 1/13/00 3:34 pm, Conley Hanson so noted...>I'm trying to write a template that will print out mailing labels for>various list.>>[writefile file=avery.pdf&secure=f]>[include file=avery_template.pdf&[search>db=list.db&eqmail_typedatarq=client][founditems]__line1[index]=[name]&__li>ne2[index]=[address1]&__line3[index]=[address2]&__line4[index]=[city]&[/fo>undItems][/search]][/writefile]>>[redirect [serverPath]/avery.pdf]>>This works great for the first 30 names on the list, but I need labels>for the next thrity as well.You're going to have to modify the avery_template.pdf file to generate a multi-page pdf.Essentially, you'll have to take everything between 2 0 obj and endobj and duplicate it in a loop for each set of 30 names with a unique number for each object (since all the low numbers are taken, you may want to start numbering at 20 -- ie 20 0 obj 21 0 obj etc).Page count is set near the bottom of the file. Say you had created three pages (obj 20-22) in the step above. You'd have to code your template (using another loop) to replace what's currently in 1 0 obj and 7 0 obj with something like this (1 0 obj renamed to 50+, again to avoid conflicts):50 0 obj<</Type /Page/Parent 7 0 R/Resources 3 0 R/Contents 20 0 R>>endobj51 0 obj<</Type /Page/Parent 7 0 R/Resources 3 0 R/Contents 21 0 R>>endobj52 0 obj<</Type /Page/Parent 7 0 R/Resources 3 0 R/Contents 22 0 R>>endobj7 0 obj<</Type /Pages/Kids [50 0 R 51 0 R 52 0 R]/Count 3/MediaBox [0 0 612 792]>>endobjYou can see how /Kids references the objects that hold /Contents that refer to your page objects. Acrobat is pretty cool in this regard. If you had some fancy graphic on each of your labels it would just have to be included in the pdf file *once,* then referenced (with transforms for the position) for each place it appears. For this three page file, that's encoding one graphic instead of 90 in the file.Adobe's PDF specification guide is available below. Always a worthwhile browse before beginning any PDF projects : )http://partners.adobe.com/asn/developer/acrosdk/DOCS/pdfspec.pdfRob MarquardtDesigner/Resident WireheadToast Design800 Washington Avenue NorthMinneapolis MN 55401612.330.9863 v612.321.9424 fwww.toastdesign.com-------------------------------------------------------------Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.To end your Mail problems go to .This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to
Rob Marquardt
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Size Limitation through a POST via SSL? (2005)
[search] in formulas.db (1997)
Date Formats (1997)
[AppendFile] problem (WebCat2b13 Mac .acgi) (1997)
Micro-managing External Links (2006)
SiteBuilder and reportin on page hits (awstats) (2006)
WebCat2b13MacPlugIn - [showif][search][/showif] (1997)
Email within tmpl ? (1997)
Multiple Pulldowns (1997)
flushdatabases (2000)
syntax question, not in online refernce (1997)
nude virgin confusion?? (2004)
SiteEdit NewFile.html ? (1997)
Calculating multiple shipping... (1997)
WebCat2b15MacPlugin - showing [math] (1997)
addlineitems within formvariable loop (1998)
Congrats SMSI (1999)
[isfolder] and [filename] (1997)
[input] [/input] (1997)
the dreaded unitShipCost (2003)