Skip to main content
Known Participant
November 22, 2014
Question

cfdocument invalid token format pdf

  • November 22, 2014
  • 1 reply
  • 381 views

I keep getting this error:

Here is the whole tag:

<cfdocument

    format = "PDF"

    backgroundVisible = "no"

    filename = "test.pdf"

    localUrl = "yes"

    marginBottom = "1"

    marginLeft = "1"

    marginRight = "1"

    marginTop = "1"

    mimeType = "text/plain"

    name = "Test"

    orientation = "portrait"

    overwrite = "yes"

    pageType = "letter"

    permissions = "AllowPrinting,AllowCopy"

    permissionspassword = "password to access restricted permissions"

    saveAsName = "Test2"

    unit = "in">

Any advice is very welcome.

Karolus

This topic has been closed for replies.

1 reply

BKBK
Community Expert
Community Expert
November 23, 2014

A first guess is that it has to be something other than the attribute, format = "PDF", as that is frequently trodden ground. To debug this, start with the following, simpler code:

<cfdocument

    format = "PDF"

    backgroundVisible = "no"

    filename = "test.pdf"> Some text </cfdocument>

If it fails, then the likely cause is that Coldfusion is unable to access the directory /CFIDE/scripts/. If works, then continue adding attributes, one by one, and testing.