Re: [WebDNA] writing pdfs on the fly (Avery labels #5160)
This WebDNA talk-list message is from 2010
It keeps the original formatting.
numero = 105040
interpreted = N
texte = Govinda,I used the same approach several years ago using the example you site as a beginning approach. In my experience this method of creating a pdfon the fly is not a very good one, especially if you are in factplanning to output a dynamic number of pages.What that example is "OK" for is for outputting a basically static pdffile with dynamic values. You simply include WebDNA where you want yourdynamic values to be populated right in the ascii text.To populate the pdf with the WebDNA values I used the following approachto write the file: [!]###### Write new PDF file for this order #######[/!] [writefile file=db/orders/[cart].pdf&secure=f][includefile=co.pdf[formvariables name=_&exact=F]&[getcharsstart=2][name][/getchars]=[url][value][/url][/formvariables]&_Co_Num=[_Co_Num]&_Dept=[Dept]&Total_Price=[_Total_Price]&_cart=[cart]][/writefile]The file named co.pdf is a pdf file saved as ascii text with WebDNAembedded where dynamic values are to be transalated.I never was able to create a method for outputting dynamic pages, onlyvalues within the pages?MarcGovinda wrote:> Hi All> > I am working to write PDFs on the fly with webdna (my first time with > this).> I thought I was in luck when I saw the sample on the webdna site > because it is said to be the exact PDF template I need (Avery labels > #5160).> > So far as far as I got is to see is that the sample (avery) I > downloaded from the webdna site seems contradictory in that it says > that it will choke on a null char (the readme says "should be ascii > only") and then in that Avery example it tries to include a file (the > pdf template) which contains a null char! (Did the author test this?!)> I do not know about the guts of a pdf to know how to go about tweaking > the template to make it pure ascii (null char-free) and have it still > work as that real pdf (formatted for avery labels 5160).> The sample directions (readme.txt) say,> "Create a pdf file (I used Distiller for this demo)> in ASCII text format so there isn't any binary data> in the file (so null characters won't cause problems)."> > The final pdf I want to write may have more than one page.> > I'd love to find success here to solve my own problem and also to > embellish the samples for the webdna site.> > It seems I need (at least) a sample pdf template (for the Avery labels > #5160) which does not contain any binary data (null chars), right?> Can anyone give me some pointers?> > ------------> Govinda> govinda.webdnatalk@gmail.com> > > > > ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list
.> To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us> old archives: http://dev.webdna.us/TalkListArchive/> Bug Reporting: http://forum.webdna.us/eucabb.html?page=topics&category=288> .> -- -------------------------------------------Marc ThompsonSoftware EngineerOffice of Information TechnologyUniversity of Utah801.585.9264marc.thompson@utah.edu-------------------------------------------
Associated Messages, from the most recent to the oldest:
Govinda,I used the same approach several years ago using the example you site as a beginning approach. In my experience this method of creating a pdfon the fly is not a very good one, especially if you are in factplanning to output a dynamic number of pages.What that example is "OK" for is for outputting a basically static pdffile with dynamic values. You simply include WebDNA where you want yourdynamic values to be populated right in the ascii text.To populate the pdf with the WebDNA values I used the following approachto write the file: [!]###### Write new PDF file for this order #######[/!] [writefile file=db/orders/[cart].pdf&secure=f][includefile=co.pdf[formvariables name=_&exact=F]&[getcharsstart=2][name][/getchars]=[url][value][/url][/formvariables]&_Co_Num=[_Co_Num]&_Dept=[Dept]&Total_Price=[_Total_Price]&_cart=[cart]][/writefile]The file named co.pdf is a pdf file saved as ascii text with WebDNAembedded where dynamic values are to be transalated.I never was able to create a method for outputting dynamic pages, onlyvalues within the pages?MarcGovinda wrote:> Hi All> > I am working to write PDFs on the fly with webdna (my first time with > this).> I thought I was in luck when I saw the sample on the webdna site > because it is said to be the exact PDF template I need (Avery labels > #5160).> > So far as far as I got is to see is that the sample (avery) I > downloaded from the webdna site seems contradictory in that it says > that it will choke on a null char (the readme says "should be ascii > only") and then in that Avery example it tries to include a file (the > pdf template) which contains a null char! (Did the author test this?!)> I do not know about the guts of a pdf to know how to go about tweaking > the template to make it pure ascii (null char-free) and have it still > work as that real pdf (formatted for avery labels 5160).> The sample directions (readme.txt) say,> "Create a pdf file (I used Distiller for this demo)> in ASCII text format so there isn't any binary data> in the file (so null characters won't cause problems)."> > The final pdf I want to write may have more than one page.> > I'd love to find success here to solve my own problem and also to > embellish the samples for the webdna site.> > It seems I need (at least) a sample pdf template (for the Avery labels > #5160) which does not contain any binary data (null chars), right?> Can anyone give me some pointers?> > ------------> Govinda> govinda.webdnatalk@gmail.com> > > > > ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us> old archives: http://dev.webdna.us/TalkListArchive/> Bug Reporting: http://forum.webdna.us/eucabb.html?page=topics&category=288> .> -- -------------------------------------------Marc ThompsonSoftware EngineerOffice of Information TechnologyUniversity of Utah801.585.9264marc.thompson@utah.edu-------------------------------------------
Marc Thompson
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:
WebCat2b13MacPlugIn - [include] doesn't allow creator (1997)
Webstar SSL and Non-SSL question (1998)
Buying sans cart (1997)
Summing fields (1997)
Cart Database (1999)
Unknown error: OrderNotCreated (1997)
[DOS]/DOS query - ANOTHER SOLUTION (2003)
[defined]ish (1997)
PSC recommends what date format yr 2000??? (1997)
encryption seeds xing (1998)
customizing the color of user's pages (1997)
weird convertchars behavior (2000)
Edit Plus and webcat code library - Gary Krockover (2003)
If Empty ? (1997)
Open Databases on Restart (1999)
[WebDNA] webdna in amazon (2020)
Cart date/time (2006)
[OT] DOD again (2003)
Keep away (1997)
WebCatalog can't find database (1997)