'> #bodytext# [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => dempster [ip] => webforumsuser@m [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 2 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> printable format - Macromedia ColdFusion

printable format - Macromedia ColdFusion

hi I have several pages of content, on each one I would like to add a print link which people can click and it opens a new window with the same content but in a printable format (could be html, pdf, flashpaper) could somebody help with this please? or point me in the right direction thanks in advance...

  1. #1

    Default printable format

    hi

    I have several pages of content, on each one I would like to add a print link
    which people can click and it opens a new window with the same content but in a
    printable format (could be html, pdf, flashpaper) could somebody help with this
    please? or point me in the right direction

    thanks in advance

    Simonbullen Guest

  2. #2

    Default Re: printable format

    Your print link could point to a ColdFusion program that uses the
    CGI.HTTP_REFERER value to open the page you want printed (using CFHTTP) . Once
    you have the text of the page, you can match text to strip out elements you
    don't want printed, such as the site navigation links. You can also add a print
    header and use a style sheet optimized for printing.

    In this example, we used the Dreamweaver tags for marking the editable text to
    extract the body of the doent.

    -Paul



    <CFIF IsDefined("CGI.HTTP_REFERER")>
    <CFHTTP URL="#CGI.HTTP_REFERER#" METHOD="GET" RESOLVEURL="yes"
    THROWONERROR="yes"></CFHTTP>
    <CFSET bstart = '<!-- InstanceBeginEditable name="body" -->'>
    <CFSET bend = '<!-- InstanceEndEditable -->'>
    <CFSET bssub = FindNoCase(bstart, cfhttp.filecontent)>
    <CFSET besub = FindNoCase(bend, cfhttp.filecontent, bssub)>
    <CFSET copysub = bssub + Len(bstart)>
    <CFSET bodytext = Mid(cfhttp.filecontent, copysub, besub-copysub)>
    <CFOUTPUT>#bodytext#</CFOUTPUT>
    </CFIF>

    dempster Guest

  3. #3

    Default Re: printable format

    On my sites, I always have a header and footer file that are included on
    pretty much ever page. On the print-only version, I pass in a variable in the
    URL called Print=1. In my header and footer files if that variable exists, I
    display a different header and footer, such as one without navigation and a
    white background on the header as opposed to colored table cells.

    TA-Selene Guest

  4. #4

    Default Re: printable format

    I've been hearing the best way to do this nowadays is to use CSS and have a
    print style sheet. There is a MEDIA thing in one of the META tags that says
    that if the output device is a printer, then use a different CSS file to format
    the page. I tried it and it seemed to work. You can set margins, it is OK to
    fix the type at 12 point Times, you can skip sections of the page (using DIVs
    to bleep them out) and other stuff.

    I think there was an article by Eric Meyer (A List Apart)? on how to do this.
    It looked like it had good prospects, and you don't have another print file
    and don't even do much to your basic web page to get it working (if you use
    CSS).


    Howard Perlman Guest

  5. #5

    Default Re: printable format

    Hi

    I am trying to add a Print Report button and thereby to print only the content
    of the page.
    I am using CSS (media = print) for that.
    But i have my header and navigation menu being included in the page using
    <cfinclude>. So i donno how to hide them from printing.
    Can anybody help me out?
    Thanks!


    lakme78 Guest

  6. #6

    Default Re: printable format

    Add a style sheet to the doc, with media attribute being "Print". In the style
    sheet, define the attributes of the "div" tag, which you will include in your
    header and footer, as having a dispay: none; Hope that this helps. Thanks.

    cgsj_usa@yahoo.com Guest

  7. #7

    Default Re: printable format

    Thx; It worked

    I am trying to print it in Landscape mode;

    I tried using

    page rotated {size: landscape}

    div.content{page: rotated; page-break-after:right;}
    and
    div.content{size: landscape}

    But it dinn work. Is there a better way of doing this?

    Thanx for your time!



    lakme78 Guest

  8. #8

    Default Re: printable format

    If my memory serves me correctly, I believe that I read that that functionality doesn't work with IE. If you are using another browser, I'm not sure why it isn't working for you. Thanks.

    Chris
    cgsj_usa@yahoo.com Guest

  9. #9

    Default Re: printable format

    Thanks for your reply.

    So for using with IE; Is having a separate printable format page. the only way?

    Thanks,
    lakme78 Guest

  10. #10

    Default Re: printable format

    You do know that CFMX 7 the ability to print web pages in a printer-friendly
    format, right?! Investigate using cfdoent tag. Additionally, CFML2PDF3 (I
    think that's the name of the tag) allows you to print a printer-friendly
    version of your web page. Hope that this helps. Thanks.

    Chris

    cgsj_usa@yahoo.com Guest

Similar Threads

  1. Printable Layer
    By kaschwei in forum Macromedia Dynamic HTML
    Replies: 3
    Last Post: August 11th, 12:46 AM
  2. Printable Area
    By Michael Dalbey in forum Adobe Illustrator Windows
    Replies: 4
    Last Post: May 25th, 10:23 PM
  3. Printable Popups
    By dude9er webforumsuser@macromedia.com in forum Macromedia Flash Sitedesign
    Replies: 1
    Last Post: November 11th, 12:18 PM
  4. Printable jpegs
    By rickm in forum Macromedia Fireworks
    Replies: 3
    Last Post: July 21st, 03:35 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •