Creating 'print this page' button using AS3

Hi all,
I need to create a button, or at least a movie clip that
functions like a button that will print a page when clicked.
Ideally I would like to have the button as part of the flash
application, which will be online embedded into a web page as a
.swf. on click the print page dialog box will appear, and the user
will be able to print out the web page. What is the best way to
code this?

sure. the swf's main timeline is a movieclip, so if you want
to print everything that's on the swf stage, use the printjob()
class to print the main timeline.

Similar Messages

  • How do I add a "Print this page" button (not just a "Print" button) to a PDF?

    I am creating a multipage PDF in Acrobat Pro 8 for a client and it includes a linked table of contents with several sections and also several forms sprinkled throughout. I need to be able to add buttons that allow the user to print specific page numbers. Is it possible to add a "print this page" button to a page ... or even a "print this form" in case the form within the larger document is multiple pages? I would appreciate any help, thanks!

    I was just coming back to here to say I've figured it out and am using an invisible button (over text that was created to look like a link) on each page... tested and working (when combined with the code). Thank you for your replies!

  • Print this page button

    Hi,
    I found this very handy liittle script for adding a print
    this page button to my pages. See below. I'd like to change the
    button though to a small image of a printer. Does anyone know how I
    can modify this script to achieve that.
    Thanks
    K
    <SCRIPT Language="Javascript">
    This script is written by Eric ([email protected])
    For full source code, installation instructions,
    100's more DHTML scripts, and Terms Of
    Use, visit dynamicdrive.com
    function printit(){
    if (window.print) {
    window.print() ;
    } else {
    var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0
    HEIGHT=0
    CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
    document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
    WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting
    dialog box WebBrowser1.outerHTML = "";
    </script>
    <SCRIPT Language="Javascript">
    var NS = (navigator.appName == "Netscape");
    var VERSION = parseInt(navigator.appVersion);
    if (VERSION > 3) {
    document.write('<form><input type=button
    value="Print this Page" name="Print"
    onClick="printit()"></form>');
    </script>

    Looks a bit archaic to me.
    Just do this -
    <form>
    <input type="image" name="printMe"
    src="images/whatever.jpg"
    onclick="self.print();">
    </form>
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "KHam1234" <[email protected]> wrote in
    message
    news:gdpre8$mgq$[email protected]..
    > Hi,
    >
    > I found this very handy liittle script for adding a
    print this page button
    > to
    > my pages. See below. I'd like to change the button
    though to a small image
    > of a
    > printer. Does anyone know how I can modify this script
    to achieve that.
    >
    > Thanks
    >
    > K
    >
    > <SCRIPT Language="Javascript">
    >
    > /*
    > This script is written by Eric ([email protected])
    > For full source code, installation instructions,
    > 100's more DHTML scripts, and Terms Of
    > Use, visit dynamicdrive.com
    > */
    >
    > function printit(){
    > if (window.print) {
    > window.print() ;
    > } else {
    > var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0
    HEIGHT=0
    >
    CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
    > document.body.insertAdjacentHTML('beforeEnd',
    WebBrowser);
    > WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a
    prompting dialog box
    > WebBrowser1.outerHTML = "";
    > }
    > }
    > </script>
    >
    > <SCRIPT Language="Javascript">
    > var NS = (navigator.appName == "Netscape");
    > var VERSION = parseInt(navigator.appVersion);
    > if (VERSION > 3) {
    > document.write('<form><input type=button
    value="Print this Page"
    > name="Print" onClick="printit()"></form>');
    > }
    > </script>
    >

  • Button to 'Print This Page Only to a printer of your choosing'

    I need to create a button to allow my user to print their current page to a printer of their choosing.
    Having them go to file print, etc etc is not an option as it will be used by hundreds of people, and the pdf is hundreds of pages long. (if they just select 'Print' that would be a lot of wasted paper)
    Ive been able to locate a Javascript that prints to the Default Printer, but my users change computers several times per day, and the default printer might located on the other side of town!
    Here is the script for 'Print this page to default printer' if anyone can assist by altering it to choose which printer, that would be amazing..
    Javascript:
    this.print(false, this.pageNum,this.pageNum);
    Even creating a button to open the print dialog box with 'Current Page' pre-selected would be ok.

    You need to use the PrintParams properties to get/set the print UI:
    var pp = this.getPrintParams();
    pp.firstPage = this.pageNum;
    pp.lastPage = pp.firstPage;
    pp.interactive = pp.constants.interactionLevel.full;
    this.print(pp);

  • Is there a way to create a "Print This Page" link?

    I have a client who want to insert a print this page link that launches their print utility. Is this possible with Muse?

    This is not a function of Muse. You'll need to use the 'insert arbitrary HTML' function to add this.
    Here's where to get the javascript to insert.
    Beware that Muse only produces a generic stylesheet and does not define its specific media type. That means that printing a Muse-generated web page or rendering a Muse website on a mobile device can be extremely messy.  Elements may fall off of a page or may be sized oddly. The Muse showcase shows how the Horace and Lydia site falls apart in print. Elements appear broken and blank pages result.
    Muse developers need to employ semantic markup so that users can design stylesheets for different media types. This topic is related to the frequent requests that Muse should be able to design for mobile devices. Muse just isn't smart enough to do what a professional designer would want.

  • How do I add a print this page link? Here is what I've done so far...

    I have tried this code:
    // Print current page silently
    print({bUI : false, nStart : pageNum, nEnd : pageNum});
    which works from the bookmark column. However, when I try to apply it (set link) within a document, it doesn't work.  My clients really want to be able to add a "print this page" link on every page (fun)... so your help is appreciated. Cheers.

    I was just coming back to here to say I've figured it out and am using an invisible button (over text that was created to look like a link) on each page... tested and working (when combined with the code). Thank you for your replies!

  • Thank you. Save or print this page for your records. We'll also send you an email confirmation. Case ID: 421912520 You have chosen to call Apple later. When you're ready, call the phone number below during business hours and refer to your Case ID for fas

    Thank you.
    Save or print this page for your records. We'll also send you an email confirmation.
    Case ID: 421912520
    You have chosen to call Apple later. When you're ready, call the phone number below during business hours and refer to your Case ID for faster support.
    1-800-MY-IPHONE
    6:00 a.m. to 11:00 p.m. Central
    iPhone
    Restore or update not working as expected
    You can review this case in the Cases &amp; Repairs section.
    Additional Resources
    Return to Apple Support home.
    Visit your Support Profile.
    Create another support request.
    Your contact information
    Onechai John
    <Email Edited by Host>

    They already have your number and/or email address and maybe have sold it several times already to others as well. They also use number generators - software that will automatically create them - some work and some don't, they don't care, they send out millions and a few will fall for it and send them money. The only way to "hide" would be to change both and your password, but then it would happen again at some point.

  • Print this page

    I am trying to add a PHP "print this page" script to my
    dreamweaver template, that I created myself and it does not want to
    work once uploaded. The template has one editable area for content.
    This is the script ( I found on the internet). I am not a developer
    but I suspect that the fact I am using a template is the problem.
    <?php
    /*PHPrint - Save this file as phprint.php
    Make any Page Printer Friendly!
    Copyright by MikeNew.Net, Notice must stay intact
    Legal: MikeNew.Net is not responsible for any damages caused
    by use of this script. (Not that it will, probably. Never
    has.)
    This script will make your pages printer friendly.
    Optionally, it will strip images as well. */
    //Do you want to strip images from the printable output?
    // If no, change to "no". Otherwise, images are stripped by
    default.
    $stripImages = "no";
    // That's it! No need to go below here. Upload it and test.
    $startingpoint = "<!-- startprint -->";
    $endingpoint = "<!-- stopprint -->";
    $read = fopen($HTTP_REFERER, "r");
    $value = "";
    while(!feof($read)){
    $value .= fread($read, 4096);
    fclose($read);
    $start= strpos($value, "$startingpoint");
    $finish= strpos($value, "$endingpoint");
    $length= $finish-$start;
    $value=substr($value, $start, $length);
    function i_denude($variable)
    return(eregi_replace("<img src=[^>]*>", "",
    $variable));
    function i_denudef($variable)
    return(eregi_replace("<font[^>]*>", "", $variable));
    $PHPrint = ("$value");
    if ($stripImages == "yes") {
    $PHPrint = i_denude("$PHPrint");
    $PHPrint = i_denudef("$PHPrint");
    $PHPrint = str_replace( "</font>", "", $PHPrint );
    echo $PHPrint;
    // Next line mandatory. Please don't remove. Nobody will see
    it except SE crawlers, anyway. Thanks! :)
    echo "<br><a href=\"
    http://www.mikenew.net/\"><img
    src=\"
    http://www.mikenew.net/images/php.gif\"
    echo "alt=\"printer friendly pages script, php\" width=\"20\"
    height=\"8\" border=\"0\"></a>";
    echo "<br/><br/>This page printed from:
    $HTTP_REFERER";
    flush ();
    ?>

    What are you expecting this script to do? What attracted you
    to it?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "fatpad" <[email protected]> wrote in
    message
    news:[email protected]...
    >I am trying to add a PHP "print this page" script to my
    dreamweaver
    >template,
    > that I created myself and it does not want to work once
    uploaded. The
    > template
    > has one editable area for content. This is the script (
    I found on the
    > internet). I am not a developer but I suspect that the
    fact I am using a
    > template is the problem.
    >
    > <?php
    >
    > /*PHPrint - Save this file as phprint.php
    > Make any Page Printer Friendly!
    > Copyright by MikeNew.Net, Notice must stay intact
    > ************
    > Legal: MikeNew.Net is not responsible for any damages
    caused
    > by use of this script. (Not that it will, probably.
    Never has.)
    > This script will make your pages printer friendly.
    > Optionally, it will strip images as well. */
    >
    > //Do you want to strip images from the printable output?
    > // If no, change to "no". Otherwise, images are stripped
    by default.
    > $stripImages = "no";
    > // That's it! No need to go below here. Upload it and
    test.
    >
    > $startingpoint = "<!-- startprint -->";
    > $endingpoint = "<!-- stopprint -->";
    >
    > $read = fopen($HTTP_REFERER, "r");
    > $value = "";
    > while(!feof($read)){
    > $value .= fread($read, 4096);
    > }
    > fclose($read);
    > $start= strpos($value, "$startingpoint");
    > $finish= strpos($value, "$endingpoint");
    > $length= $finish-$start;
    > $value=substr($value, $start, $length);
    >
    > function i_denude($variable)
    > {
    > return(eregi_replace("<img src=[^>]*>", "",
    $variable));
    > }
    >
    > function i_denudef($variable)
    > {
    > return(eregi_replace("<font[^>]*>", "",
    $variable));
    > }
    >
    > $PHPrint = ("$value");
    >
    > if ($stripImages == "yes") {
    > $PHPrint = i_denude("$PHPrint");
    > }
    >
    > $PHPrint = i_denudef("$PHPrint");
    > $PHPrint = str_replace( "</font>", "", $PHPrint );
    >
    > echo $PHPrint;
    > // Next line mandatory. Please don't remove. Nobody will
    see it except SE
    > crawlers, anyway. Thanks! :)
    > echo "<br><a href=\"
    http://www.mikenew.net/\"><img
    > src=\"
    http://www.mikenew.net/images/php.gif\"
    > echo "alt=\"printer friendly pages script, php\"
    width=\"20\" height=\"8\"
    > border=\"0\"></a>";
    > echo "<br/><br/>This page printed from:
    $HTTP_REFERER";
    > flush ();
    > ?>
    >

  • How do I create jump to (page) links using DPS in creating a digital page turner for a catalog?

    I know how to use "navto" to jump to pages within the catalog created for our app.
    We want to use the same article files to create a digital page turner using DPS but cannot figure out how to do it. Google searches lead to answers that say it isn't possible, but if i view a page turner I created in 3D Issue via Adobe's Content Viewer, the pages jump (via the links I made in 3D Issue).
    I just can't believe that a huge company like Adobe has no way to do this in DPS.

    On pages you do not want to show-up delselect "include page in navigation menu" in the page inspector:

  • Print this Page Java html snippet

    I decided to try adding the above to one of my pages in iWeb.
    I added the java code as shown on Old Toad's site:-
    <form>input type="button" value=" Print this Page "
    onclick="javascript:parent.window.print();return false;"/></form>
    I placed this code in an html snippet in iWeb and applied it and it showed up as Print this Page in the site. I then published the site to a local folder and uploaded the changed pages to my external server. After uploading, I visited my site and tried clicking on the button and it did not work.
    Anyone know why it did not work? The code is correct and I copied and pasted from OT's site directly into an html snippet.
    Is the code site or page specific or generic, that it will work for any site?
    Does it only work in MobileMe published sites and not for sites uploaded to an external server?
    Any insights gratefully received.

    Does the print button work when the site was on your HD locally? Here's some different code that you might try:
    <SCRIPT LANGUAGE="JavaScript">
    // This script was supplied free by Hypergurl // <a class="jive-link-external-small" href="http://www.hypergurl.com">http://www.hypergurl.com</a> <!--
    hide script and begin if (window.print) { document.write('<form>Click Here
    To ' + '<input type=button name=print value="Print" ' + 'onClick="javascript:window.print()">
    This Page!</form>'); } // End hide --> </script>
    The original code should work on any server as far as I know. Cyclosaurus is the authority on javascript and should have an answer.
    This Google search has numerous examples of code:http://www.google.com/search?hl=en&safe=active&client=safari&rls=en-us&ei=MBCjSd X6LoK2sQOIj8zGCQ&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=javascriptto+printpage&spell=1

  • Tell a friend/print this page

    how can you add those links on your page?
    ...tell a friend...
    ...print this page...
    Thanks

    Hoi Bart,
    Have a look here, it's all Javascript post-publish stuff, you know the drill.
    http://www.hypergurl.com/printpage.html
    http://www.sitetoolcenter.com/website-tools-and-tutorials/tell-a-friend-javascri pt.php
    See you soon
    Leo

  • Why does the new "share this page" button not stay deleted?

    Two issues with the latest two releases (35.0 and the one before)...
    1. The new "share this page" button (with the paper airplane icon) reappears everytime FF is started -- even though I have removed it from the toolbar. How can I make stay gone?
    2. The new info bar at the screen bottom "FF automatically sends some data..." is always present when FF starts -- even though I have completed the "choose what I share" Option. How do I permanently remove this?

    Separate Issue;
    Your System Details shows;
    Installed Plug-ins
    Shockwave Flash 16.0 r0
    Shockwave Flash 14.0 r0
    Adobe Shockwave for Director Netscape plug-in, version 12.1.5.155
    Adobe Shockwave for Director Netscape plug-in, version 12.1.4.154
    Having more than one version of a program may cause issues.
    Grab the uninstaller from here:
    '''[http://helpx.adobe.com/flash-player/kb/uninstall-flash-player-windows.html Uninstall Flash Player | Windows]'''
    '''[http://helpx.adobe.com/flash-player/kb/uninstall-flash-player-mac-os.html Uninstall Flash Player | Mac]'''
    Then reinstall the latest version.
    Flash Player '''v16.0.0.235 https://www.adobe.com/products/flashplayer/distribution3.html'''
    Shockwave Director '''v12.1.5.155 http://get.adobe.com/shockwave/'''
    '''https://support.mozilla.org/en-US/kb/how-to-fix-preferences-wont-save'''

  • Print Iwork Pages "Book" using Apple's Print Service?

    I've created a thirty-page travelogue in Pages, mostly text with several dozen photos. Is there a way to have Apple publish it using the iPhoto print service?
    Thanks,
    George
    Dual 2.7 G-5 PowerMac   Mac OS X (10.4.4)   4GB Memory, 250+400GB SATA Drives, Brother MFC -5440CN Printer

    I'm not sure about the conversion.
    In this thread, Old Toad gives information about DPI settings. I haven't done much with that yet but it might help you out.
    http://discussions.apple.com/message.jspa?messageID=1516265#1516265
    I have gotten good results with doing this but have no idea what the DPI setting is for what I've done.
    Hope this helps.

  • Is there a script to create a next page button

    I have a PDF that I need to create next and previous page buttons on. There is no option in the actions menu. Is there a java script I can run to make this happen. I am using Acrobat 9 Pro and I do not know javascript at all.
    Thanks Tom

    Hi tommy_boy56
    You didn't go far enough.
    Acrobat 9 has that function built in.
    Click on OK to create a button.
    Name it NextPage.
    Then go under properties/options.
    Then under labels type Next Page.
    Then under actions select mouse down.
    Execute Menu Item.
    Then choose add.
    Then select View>Go To>Next Page
    Then select OK.
    Do the same for Previous Page or whatever else you want.
    Once you have the "Next Page" and "Previous Page" in place just copy both and paste on each page.
    Ron

  • Printing A3 page format using ABAP List from SAP is a problem...

    Hi Experts,
    I am trying to print a standard output (ABAP List) A3 page size from SAP.
    I used SWIN, SAPWIN, I9HP4 device types, but none of them worked.
    I created page format type ZYEVMIYE 290MM – 420MM and the page format L120, W200. In order to make it usable with page size is A3. Unfortunately this did not work either.
    The behaviour of the problem is when I tried to print with the device types that mentioned above then printer indicator comes to an error. And nothing comes out from the printer.
    Just to be on the safe side I made a test from windows self test, it resulted success with A3 page size format. So from this point of the view I got a thought that somehow SAP (selected device types) is not able to send correct signal to Printer for page size A3, because on the printer information screen displays ‘load Tray2 for A4’ this is showing that SAP sends Printer a signal for page format A4.
    I need help on how to make SAP (selected device type) send a correct signal to Printer in order to printout A3 page size format.
    Quick reply will much be appreciated.

    Hi,
    At last i got a Solution to my Question.
    The Problem is that in my SAP-Code they have been translated the PDF into 255 string.But i am retreiving using 132 string.So, i resolved in this way.
    <b>For Each dr As DataRow In ds.Tables(0).Rows
    Dim dataline As String = dr(0)
    If dataline.Length < 255 Then
    dataline = dataline.PadRight(255, " ")
    End If
    sb.Append(dataline)
    Next.</b>
    May be this Thread is useful to Others.
    Regards,
    Rajender.

Maybe you are looking for

  • How do you know if users have a history of marking answers?

    In Stack Overflow, you can easily see if a user is going to acknowledge your help by looking at their acceptance rate. I am finding it frustrating, however, that my answers on the Adobe forums are often ignored in favor of answers I feel are leading

  • DUE DATE FOR CREDIT MEMO

    Hello, I have a question about credit memo -due date. Using MIR7, MIRO for credit memo  the due date for net payment is the same with baseline date. e.g. document date:18/07/2007 posting date:18/07/2007 baseline date:18/07/2007                       

  • SmartView 11.1.2.5.400 - corrupt zip archive?

    Hi, I have recently downloaded SmartView 11.1.2.5.400 zip and couldn't uncompress it - corrupt zip archive. I have tried different browsers(IE, Firefox, Chrome etc ) and download sources (eDelivery and OTN). Has anyone else experienced the same? If s

  • H.264 recording through QT Pro

    ver 7.6 prefs allow you to record in h.264. BUT, online tutorial suggests that file must still be de-interlaced by another app (like Compressor)before being streamed. If file is already an M4v from QT Pro, how would you accomplish this in 1 pass??? M

  • I purchased my Mac Air from a friend.  I am trying to update some programs but his AppleID defaults and I cannot enter mine.

    How do I rid the computer of his AppleID  I am using my ITunes and have purchased apps on my acct.  I am trying to update Pages.