Joshua,

You could try htmldoc, a very powerful html to pdf convertor utility, which
works via the Command line and is free. http://www.easysw.com/htmldoc

There's excellent flexibility and documentation with this product. I don't
work for them, but I've used htmldoc for over 2 years now for all sorts of
things, from creating personalised custom car brochures on the fly, to
invoicing, or simply converting a brochureware site to a pdf booklet.

I began using it when using CF4.5 which had some problems with its cfexecute
tag, so I've used the CFX_execute tag available from the tag gallery,
eversince.

HTH,
Dave

-----Original Message-----
From: Joshua Miller [mailto:[EMAIL PROTECTED]]
Sent: 15 October 2002 19:54
To: CF-Talk
Subject: HTML2PDF3 on CFMX


I can't get HTML2PDF3 to work with CFMX ... I get a java.io.IOException
error. The documentation seems a bit flaky too ... It refers to using
the path to the executable wihtout the .exe or filename, then the sample
file uses the full path and filename to the executable - it errors
either way, using the sample file right out of the ZIP or modifying it
as the directions say it should work. It generates the HTML templates,
then doesn't convert - it errors when accessing the executable file.

Anyone know of anything else? Or anyone have any experience with
HTML2PDF3 on CFMX?

Thanks,

Joshua Miller
[EMAIL PROTECTED]


-----Original Message-----
From: Eric G. Myers [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 15, 2002 2:17 PM
To: CF-Talk
Subject: Re: PDF to HTML on-the-fly


At 01:37 PM 10/15/2002 -0400, you wrote:
>There is the html2pdf3 tag in the gallery that works quite well.  And
>its free.
>
>Sam

Here's something that I ran across that doesn't seem to work (at least I

couldn't make it work with MX).

I don't have the author attribution easily available, but I'm sure I
could
find it if anyone is interested.

In any case, I'd be interested if someone knows how to make something
like
this work (a situation where you can use form inputs to populate PDF
form
fields and present the pdf to the end user or mail it or whatever).

I'll list the entire set of instructions below.

Thanks in advance.

EGM



PDF Form Fields  How To
This example was done with Adobe 5 and Word 2K

1.      Create the .doc or .dot as you require.
2.      Save it as a .pdf using Adobe
3.      Open the pdf with Adobe
4.      Add the form fields.  This is done by clicking on the form tool
and
placing the field where you want it.

In my example the grid is turned on (CTRL U) or by clicking on View|Grid
The grid settings are adjusted by clicking on Edit|General|Layout Grid.
In
this case, the width and height between lines is .25” with two
subdivisions.

5.      Right-click on the field, then on “Properties”.  Next click on
“Options”.
6.      In the example, the first field is called “today” and the
default
is called #todayDate#.  This will be a variable name a little later.
The
“Type” is text. This is the default.
7.      The second field in the example is done the same way.
8.      Save the pdf.
9.      Next, click on “File|Export|Form Data” and save the exported
form
(This is the .fdf) to the same directory as the pdf.
10.      Now, start ColdFusion studio and open the fdf this way:  Click
on
File|Open|All Files.  You will see a warning that this is an
File|Open|unrecognized
text file.  Click on “Open”, anyway.
11.       Place a <CFOUTPUT> tag right before the first % sign in the
fdf
and a </CFOUTPUT> immediately after the EOF at the end of the fdf.  The
example shows you where.  Spaces before or after the tags will generate
errors.
12.      In the area where you see  “/F (sampledoc.pdf)/ID” (without the

quotes) add an URL path before the filename, such as
“http://servername/directory structure/filename” (without the quotes).
See
the example.  Where you see servername above, you can use localhost or
an
IP address.
13.     Save the file.
14.      Open a new CF template and add the code per the example.  Save
it.
15.       You sre ready to go.


NOTES:   1.  Adobe will not preserve your source document margins.
2.      The text in the Adobe document will not be in exactly the place
as
the source document.  To get
      Adobe to put things where you want them, you have to “play” with
the
source document.
3.  You CANNOT open the fdf with Adobe. You will get an error.  Open it
with CF Studio.



The FDF looks like this:

<cfoutput>%FDF-1.2
%âăĎÓ
1 0 obj
<<
/FDF << /Fields [ << /V (#fieldcontent#)/T (fieldcontent)>> << /V
(#todayDate#)/T (today)>>
]
/F (http://master/dqa/adobe/sampledoc.pdf)/ID [
<c2331da405f412d95820b8849ee5fb59><0f5bb617ffcfb2e18a1dd497cd3c2b18>
] >>
 >>
endobj
trailer
<<
/Root 1 0 R

 >>
%%EOF
</cfoutput>






The CF template looks like this:

<!---set date --->
<cfset todayDate=#day(now())#&"
"&#MonthAsString(month(now()))#&",  "&#year(now())#>

<!---simulate a query variable--->
<cfset simulatedcontent="This could be a query result">
<!--- if a query, it could be <cfset simulatedcontent =
"#queryname.fieldname#"> --->

<!---this comes next--->
<cfsetting enablecfoutputonly="yes">

<!---add variables--->
<cfset variables.todayDate="#todayDate#">
<cfset variables.fieldcontent="#simulatedcontent#">

<!---Fire it up--->
<cfheader name="content-disposition"
value="inline;filename=sampledoc.fdf">
<cfcontent type="application/vnd.fdf">
<cfsetting enablecfoutputonly="no">
<cfinclude template="sampledoc.fdf">





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

Reply via email to