Re: PDF Tools

This WebDNA talk-list message is from

2006


It keeps the original formatting.
numero = 67970
interpreted = N
texte = Hi It's pretty straightforward. Basically you create an html template page which can include [webdna stuff]. This is the page that will be turned into a pdf, so lay it out how you want the pdf to look. Then on your 'admin' page that will actually create the pdf file, you pass the url for your template to HTMLDoc using [shell] and HTMLDoc creates the pdf file based on your template. Here is the basic code we use... http://www.yourwebsite.com/page_to_pdf.html is our template. On our admin page we have this code... [!]-- Set the variables --[/!] [text]DLFileName=[Cart].pdf[/text] [!]--- Preset parameters --[/!] [text]PageAddress=http://www.yourwebsite.com/page_to_pdf.html[/text] [text]Options=-t pdf14 --webpage --browserwidth 680 --size a4 -- portrait --left 36 --right 36 --top 36 --bottom 36 --header ... -- footer ...[/text] [text]TempFilePathFull=/full/path/to/website/pdfGenerator/temp/[Cart] [/text] [text]TempFilePathRel=pdfGenerator/temp/[Cart][/text] [text]TempFolderPathRel=pdfGenerator/temp/[/text] [!]-- Generate the pdf file --[/!] [shell]htmldoc [Options] -f [TempFilePathFull] '[PageAddress]'[/shell] [!]-- Send response to the browser --[/!] [text]line_ending=%0D%0A[/text] [ReturnRaw binarybody=[TempFilePathRel]]HTTP/1.0 200 OK[unurl] [line_ending][/unurl][!] [/!]Status: 200[unurl][line_ending][/unurl][!] [/!]Content-Type: application/pdf[unurl][line_ending][/unurl][!] [/!]Content-phil: '[TempFilePathRel]'[unurl][line_ending][/unurl][!] [/!]Content-Disposition: attachment; filename="[DLFileName]"[unurl] [line_ending][line_ending][/unurl][!] [/!][/ReturnRaw] Basically we set the pdf name to a [cart] and set a few fixed parameters: where the template is, where the pdf should be saved etc. Pass these to HTMLDoc. Return the pdf to the browser. This is all on Mac OS X Server with WebDNA 6. Cheers Paul On 16 Aug 2006, at 00:11, Stuart Tremain wrote: > Paul > > Have you found it easy to use with WebDNA, any examples you wish to > share ? > > Stuart Tremain > idfk web developments, sydney, australia > > > On 16 Aug 2006, at 8:28 AM, Paul Willis wrote: > >> We use HTMLdoc >> >> Paul >> >> On 14 Aug 2006, at 21:04, Bess Ho wrote: >> >>> I find this server too www.corda.com but it is $3000 per cpu. Any >>> one has any other open source, tools, methods? >>> >>> -----Original Message----- >>> From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On >>> Behalf Of >>> Thierry Almy >>> Sent: Friday, August 11, 2006 11:32 PM >>> To: WebDNA Talk >>> Subject: Re: PDF Tools >>> >>> >>>> Can someone recommend any reliable tools to do the following PDF >>>> integration/conversion? >>>> >>>> 1. User enter data on web form, data saved to a pre-existed PDF, >>>> email saved PDF back to user >>>> 2. Convert HTML to PDF >>> >>> A few month ago I was gambling around with Corda Server (http:// >>> www.corda.com/) >>> It looks quite nice, makes good PDFs, is easy in use, runs on >>> multiple platforms - but it has it's price. >>> >>>> 3. Convert XML to PDF >>>> >>>> I like to see if I can find better tools and solutions. >>>> >>>> ------------------------------------------------------------- >>>> 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 >>>> >>>> Web Archive of this list is at: http://webdna.smithmicro.com/ >>> >>> >>> ------------------------------------------------------------- >>> 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 >> digest@talk.smithmicro.com> >>> Web Archive of this list is at: http://webdna.smithmicro.com/ >>> >>> ------------------------------------------------------------- >>> 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 >> digest@talk.smithmicro.com> >>> Web Archive of this list is at: http://webdna.smithmicro.com/ >> >> >> ------------------------------------------------------------- >> 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 > digest@talk.smithmicro.com> >> Web Archive of this list is at: http://webdna.smithmicro.com/ > > > ------------------------------------------------------------- > 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 digest@talk.smithmicro.com> > Web Archive of this list is at: http://webdna.smithmicro.com/ ------------------------------------------------------------- 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 Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: PDF Tools ( Paul Willis 2006)
  2. Re: PDF Tools ( Larry Hewitt 2006)
  3. Re: PDF Tools ( "Bess Ho" 2006)
  4. Re: PDF Tools ( Paul Willis 2006)
  5. Re: PDF Tools ( Paul Willis 2006)
  6. Re: PDF Tools ( Dale 2006)
  7. Re: PDF Tools ( "Bess Ho" 2006)
  8. Re: PDF Tools ( Paul Willis 2006)
  9. Re: PDF Tools ( Stuart Tremain 2006)
  10. Re: PDF Tools ( Paul Willis 2006)
  11. Re: PDF Tools ( "Bess Ho" 2006)
  12. Re: PDF Tools ( Thierry Almy 2006)
  13. PDF Tools ( "Bess Ho" 2006)
Hi It's pretty straightforward. Basically you create an html template page which can include [webdna stuff]. This is the page that will be turned into a pdf, so lay it out how you want the pdf to look. Then on your 'admin' page that will actually create the pdf file, you pass the url for your template to HTMLDoc using [shell] and HTMLDoc creates the pdf file based on your template. Here is the basic code we use... http://www.yourwebsite.com/page_to_pdf.html is our template. On our admin page we have this code... [!]-- Set the variables --[/!] [text]DLFileName=[cart].pdf[/text] [!]--- Preset parameters --[/!] [text]PageAddress=http://www.yourwebsite.com/page_to_pdf.html[/text] [text]Options=-t pdf14 --webpage --browserwidth 680 --size a4 -- portrait --left 36 --right 36 --top 36 --bottom 36 --header ... -- footer ...[/text] [text]TempFilePathFull=/full/path/to/website/pdfGenerator/temp/[cart] [/text] [text]TempFilePathRel=pdfGenerator/temp/[cart][/text] [text]TempFolderPathRel=pdfGenerator/temp/[/text] [!]-- Generate the pdf file --[/!] [shell]htmldoc [Options] -f [TempFilePathFull] '[PageAddress]'[/shell] [!]-- Send response to the browser --[/!] [text]line_ending=%0D%0A[/text] [ReturnRaw binarybody=[TempFilePathRel]]HTTP/1.0 200 OK[unurl] [line_ending][/unurl][!] [/!]Status: 200[unurl][line_ending][/unurl][!] [/!]Content-Type: application/pdf[unurl][line_ending][/unurl][!] [/!]Content-phil: '[TempFilePathRel]'[unurl][line_ending][/unurl][!] [/!]Content-Disposition: attachment; filename="[DLFileName]"[unurl] [line_ending][line_ending][/unurl][!] [/!][/ReturnRaw] Basically we set the pdf name to a [cart] and set a few fixed parameters: where the template is, where the pdf should be saved etc. Pass these to HTMLDoc. Return the pdf to the browser. This is all on Mac OS X Server with WebDNA 6. Cheers Paul On 16 Aug 2006, at 00:11, Stuart Tremain wrote: > Paul > > Have you found it easy to use with WebDNA, any examples you wish to > share ? > > Stuart Tremain > idfk web developments, sydney, australia > > > On 16 Aug 2006, at 8:28 AM, Paul Willis wrote: > >> We use HTMLdoc >> >> Paul >> >> On 14 Aug 2006, at 21:04, Bess Ho wrote: >> >>> I find this server too www.corda.com but it is $3000 per cpu. Any >>> one has any other open source, tools, methods? >>> >>> -----Original Message----- >>> From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On >>> Behalf Of >>> Thierry Almy >>> Sent: Friday, August 11, 2006 11:32 PM >>> To: WebDNA Talk >>> Subject: Re: PDF Tools >>> >>> >>>> Can someone recommend any reliable tools to do the following PDF >>>> integration/conversion? >>>> >>>> 1. User enter data on web form, data saved to a pre-existed PDF, >>>> email saved PDF back to user >>>> 2. Convert HTML to PDF >>> >>> A few month ago I was gambling around with Corda Server (http:// >>> www.corda.com/) >>> It looks quite nice, makes good PDFs, is easy in use, runs on >>> multiple platforms - but it has it's price. >>> >>>> 3. Convert XML to PDF >>>> >>>> I like to see if I can find better tools and solutions. >>>> >>>> ------------------------------------------------------------- >>>> 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 >>>> >>>> Web Archive of this list is at: http://webdna.smithmicro.com/ >>> >>> >>> ------------------------------------------------------------- >>> 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 >> digest@talk.smithmicro.com> >>> Web Archive of this list is at: http://webdna.smithmicro.com/ >>> >>> ------------------------------------------------------------- >>> 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 >> digest@talk.smithmicro.com> >>> Web Archive of this list is at: http://webdna.smithmicro.com/ >> >> >> ------------------------------------------------------------- >> 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 > digest@talk.smithmicro.com> >> Web Archive of this list is at: http://webdna.smithmicro.com/ > > > ------------------------------------------------------------- > 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 digest@talk.smithmicro.com> > Web Archive of this list is at: http://webdna.smithmicro.com/ ------------------------------------------------------------- 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 Web Archive of this list is at: http://webdna.smithmicro.com/ Paul Willis

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:

Cookie Newbie (2002) When do we get to request new features? (1999) [WebDNA] Conversion of 500.000 records; advise needed (2008) [WebDNA] [tcpconnect] timeout (2015) Uh...can someone help me out with the b10? (1997) Showif = stumped? (2001) show all problem (1997) Practice runs ? (1997) Two submit buttons ? (1997) attachment (2000) show all problem (1997) Multiple security dbs (1997) Emailing html (1998) Sort Order on a page search (1997) customizing the color of user's pages (1997) WebCatalog2 Feature Feedback (1996) HomePage Caution (1997) WebDNA Threaded Discussions? (2004) Our Webcat site launched (1997) [OT] Sybase vs. Pervasive SQL for WebDNA integration? (2005)