problem with CFDOCUMENT

Discussion in 'Programming' started by igarcia, Jun 19, 2007.

  1. #1
    im pulling info from my access database to create both a PDF and FLASHPAPER version of a document. My FLASHPAPER version works but when I test the PDF version this error comes up:

    access denied (java.io.FilePermission c:\windows\fonts\times.ttf read)

    --------------------------------------------------------------------
    my code
    --------------------------------------------------------------------
    <cfif NOT isDefined ("URL.ID")>
    <cflocation url="media.cfm">
    </cfif>
    <style type="text/css">
    <!--
    .style1 {
    font-size: 16px;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-weight: bold;
    }
    .style2 {
    font-size: 12px;
    font-family: Verdana;
    font-weight: bold;
    }
    .style3 {
    font-size: 10px;
    font-family: Verdana;
    }
    -->
    </style>

    <cfif URL.print EQ 1>
    <!--- FLASHPAPER PRINT --->
    <cfquery datasource="was2008" name="pressRelease_PDF">
    SELECT *
    FROM mediaInfo
    WHERE releaseID = #URL.ID#
    </cfquery>

    <cfoutput query="pressRelease_PDF">
    <cfdocument format="PDF" margintop=".5" marginleft=".5" marginright=".5" marginbottom=".5">
    <table border="0" cellpadding="3" cellspacing="3" width="100%">
    <tr align="center">
    <td><img src="logos/FINAL_2007_logo_media.jpg" width="125" height="128" /></td>
    </tr>
    <tr align="center">
    <td>
    <span class="style1">#releaseTitle#</span>
    <br />
    <span class="style2">#releaseSubTitle#</span>
    </td>
    </tr>
    <tr>
    <td class="style3">#fullRelease#</td>
    </tr>
    </table>
    </cfdocument>
    </cfoutput>
    <cfelse>
    <!--- FLASHPAPER PRINT --->
    <cfquery datasource="was2008" name="pressRelease_FP">
    SELECT *
    FROM mediaInfo
    WHERE releaseID = #URL.ID#
    </cfquery>

    <cfoutput query="pressRelease_FP">
    <cfdocument format="FLASHPAPER" margintop=".5" marginleft=".5" marginright=".5" marginbottom=".5">
    <table border="0" cellpadding="3" cellspacing="3" width="100%">
    <tr align="center">
    <td><img src="logos/FINAL_2007_logo_media.jpg" width="125" height="128" /></td>
    </tr>
    <tr align="center">
    <td>
    <span class="style1">#releaseTitle#</span>
    <br />
    <span class="style2">#releaseSubTitle#</span>
    </td>
    </tr>
    <tr>
    <td class="style3">#fullRelease#</td>
    </tr>
    </table>
    </cfdocument>
    </cfoutput>
    </cfif>
     
    igarcia, Jun 19, 2007 IP
  2. newbish

    newbish Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Have you given the IUSR read access to the fonts folder?
     
    newbish, Jun 19, 2007 IP
  3. igarcia

    igarcia Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    how would i go about doing that?
     
    igarcia, Jun 20, 2007 IP
  4. datropics

    datropics Peon

    Messages:
    309
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    0
    #4
    1 go to the fonts folder
    2 right click and choose properties (depending on your ver of Windows you could choose security or sharing)
    3) look for the tab security
    4) add the above mentioned user and give him the appropriate privileges.

    HTH

    daTropics
     
    datropics, Jun 21, 2007 IP