Skip to main content
May 19, 2010
Question

cfpdfform (CF8) changes text-field font of an adobe 9 pdf form to Courier

  • May 19, 2010
  • 1 reply
  • 1775 views

I'm having problems getting cfpdfform to render the text-field font as it exists in the source pdf form.

The source pdf form was created in Acrobat 9 Standard.

When I download the pdf from the server using cfcontent, the text-fields look as expected, retaining their designated font (and the pdf has the desired fonts embedded).

However, when I do a cfpdfform action="populate", the text-field font is switched with Courier (even though the desired fonts remain embedded).

This happens regardless of what font I pick.

I have verified that the font exists on the server and in cf admin.

Here's my code:

<!--- populate --->
<cfpdfform action="populate"
           source="#pdfPathFile#"
           destination = "#pdfPathFile#"
           overwrite = "yes">

    <cfpdfformparam name="student_name" value="first name and last name" />
    <cfpdfformparam name="certificate_title" value="a cool certificate title" />
    <cfpdfformparam name="certificate_date" value="1/1/2010" />

</cfpdfform>

<!--- make read-only --->
<cfpdf action = "write"
       destination = "#pdfPathFile#"
       source = "#pdfPathFile#"
       flatten = "yes"
       overwrite = "yes"  />

<!--- return the content --->
<cfcontent
    file = "#pdfPathFile#"
    deleteFile = "yes"
    reset = "yes"
    type = "application/pdf" />

Commenting out the cfpdf action = "write" block produced the same outcome.

Using different source and destination filenames (vs overwriting  existing one) didn't make a difference, either.

Any ideas on how I can get cfpdfform to respect my predefined text-field fonts?

I truly appreciate your time.

This topic has been closed for replies.

1 reply

May 21, 2010

The problem was resolved.

Turned out to be the way the pdf was created by Adobe 9 Standard that made cfpdfform misbehave.

Three things we did seemed to have made the pdf acceptable by cfpdfform:

1. Downloaded the latest updates for Adobe 9 Standard
2. Checked on the text-field "Multi-line" property
3. Checked off the text-field "Rich Text Formatting" property

Cheers.

Participating Frequently
August 30, 2011

Thanks for the tip!

Any experience inserting images inside pdf forms?

It seems to work but won't 'survive' when flattening the pdf form to a static Acrobat file.  Any ideas?