Print Dynamic Content with printJob

I recently developed a help resource application that builds
the interface and loads all the main and sub navigation items,
pages contents, and related resources dynamically. This was to make
it easy to provide search and print functionality, as well as
interface scalability. Therefore my print feature creates a print
layout MovieClip (so as to format well for 8.5 x 11 and printer
margins) and loads the appropriate text content related to the
visible page on screen when the print button is pressed.
I thought the print was all set to go, but what I found out
is that once you print a page of the Help Resource application that
same page prints in place of any other page you print from there on
out.
My print button calls a function that pulls all the
appropriate dynamic data (page title, page contents, related
resource names, etc.) and formats it as HTML and adds it to my
print layout MovieClips text field (docPrint._txt).
That function then calls my printJob function which creates a
blank sprite, adds my print layout movieclip to that sprite,
resizes the print layout MovieClip’s text field to fit
appropriately within the printer margins and prints the file.
Anyone have any ideas why my dynamic content prints as the
same page each time? Note that if I trace the contents of my text
field for my print layout MovieClip the contents change each time,
but the print stays the same.
Sorry for the long post and huge thanks to anyone who may
have an answer.
Have a great day!

I am responding to my own post as I found a solution, though
I am now about bald from pulling all my hair out. Hopefully this
helps even one random soul in the future as the printJob class
seems to be one of the hardest to get help with or find information
online that pertains.
My code dynamically creates print page contents based on the
on screen contents the user is currently viewing within my
application. My print functions were always printing the first page
that was printed no matter what page within the application the
user was viewing.
As I have learned to do, I was declaring the variables for my
print objects in the root of my actionScript (outside all the
functions so they could be accessed across functions).
I had two variables:
var docPrint:document = new document(); // A MovieClip layout
for my print page located in my library
var printPage:Sprite = new Sprite(); // The Sprite to hold my
MovieClip for print purposes as a sprite is required
I also had two functions:
docContentsLoad(); // Loaded contents into docPrint Movieclip
and formatted
printJob(); // Created print job, adjusted docPrint for
printer settings, and sent print
It turns out the easiest solution was to combine my two
functions into one printJob function and place my two variables
(docPrint & printPage) at the beginning of the function. Now
the printing works fine everytime. No more repeat pages.
My assumption is that the only way to truly reset the print
document is to delcare the variables within the function being
called to print the document so that they are redeclared each
time.

Similar Messages

  • Can't Print Large Images With PrintJob()

    Hey all,
    I'm having an issue where when I try to print a larger image
    via printjob one of two things happens. One either the job fails or
    two the output of the image is literally diagonally cut off. I am
    simply passing the stage to the print job. I've tried both with and
    without using printAsBitmap. Anyone encounter anything like
    that?

    nope. but you'll need to scale your stage to fit the
    page.

  • My emails do not print full content with Epson DX6000

    I can print Pictures and Word documents but email content does not print - even though 'Print Preview' looks OK

    To all who have responded to my query - thanks very much. Apparently what was obvious to others was not obvious to me - I did not make the connection that three dots implied a print option, especially since other email functions had their own displayed buttons in outlook. Cheers,

  • Dynamic content with Acrobat?

    Hello there!
    I´m wondering if I can do this with Acrobat Pro:
    I´ve got dozens of industrial PDF manuals that I have to update once in a while. Sometimes these updates are just a phone number, email, whatever, that has to be updated in ALL manuals, one by one. This is so stupid.
    So I would like to be able to replace this kind of info with, say, dynamic fields that would read the updated info from one place, so that I would be able to edit ONCE and create all updated manual copies with a few clicks,
    Possible? How?  :-)
    Thank you very much for any hints!

    Hi try67,
    Thank you!
    Where can I get information about how to do it?
    I´m very new to this.
    Thanks!

  • Sporadic issues uploading large dynamic content blocks using REST API

    I have been using calls to endpoints like https://secure.eloqua.com/API/REST/1.0/assets/dynamicContent/157 (where "157" is a content block ID) to update existing dynamic content blocks. This has generally worked well for about a month and a half. Starting Saturday morning around Midnight, though, the majority of these calls started failing, with socket error "connection was forcibly closed by remote host".
    That's the .NET verbiage; at a lower level, this is socket error #10054. When using CURL, I get the result pictured below:
    This is sporadic; over the course of today, maybe 25% of these calls have succeeded and 75% have failed. The calls are mostly identical. At other times, we've gone days, maybe weeks without an issue, and I figured that the isolated failures of this sort that we did get related to scheduled downtime, loss of connectivity, and other transient conditions.
    The payload (PUT data) I'm sending up is ~450KB of JSON. It contains the top-level details about the block itself, plus all of the dynamic content / rules criteria, including the default.
    At first, I wondered if some sort of weird character (ampersand, less than / greater than...) had entered my data, flowed into the API call unescaped, and created a problem (e.g. invalid JSON). However, I did some troubleshooting, and the failure we're seeing does not seem to correlate with the absence or presence of any one content / rule item in particular. Rather, it seems to be volume related, i.e. I can send any one of the rules I want to create, or just a few, and that will succeed. But I cannot send all (or most) of the rules at once without experiencing failures most of the time (lately).
    So, if there were a way for me to split up the creation of the block over multiple API calls (one call to create the block, another to add the default content rule, yet another for the first non-default content rule, and so on), I think that would work. I find no indication on Topliners or in the Eloqua API documentation to indicate that this is possible, though.
    It has occurred to me that we are over some API call threshold. I know that some Eloqua installations have a per-day API call limit as low as 20,000. My question is, what do I see when I exceed the limit? Do I get the "forcibly closed" error, or another error perhaps, or is my activity simply throttled by the server? And is there somewhere in Eloqua that I can see where I stand with respect to this limit?
    Finally, I know we've done some things recently that have increased our overall processing load on the Eloqua servers. In particular, a larger number of contacts than previously have been flowing in from our CRM system. One theory I had was that we're allocated a certain amount of total processing power, and that if we overload this capacity complex API calls are subject to timing out. (My communications timeout is set to 10 minutes, and the error message comes up after about 2-3 minutes, but I don't know what kind of timeouts Oracle might have set up on their own equipment.) That being said, my code needs to basically wait indefinitely for this data, and certainly not give up after 2-3 minutes. If there's a way to indicate this fact to Oracle, I'd certainly like to know about that.
    Thank you all for reading and attempting to help!

    Hi James,
    As far as I have been told (by Support) is that the API Limit is a soft limit that is not currently enforced.
    I have seen other API endpoints failing from time to time (mostly on the BULK API) and have had to write logic to redo calls that fail. My failures seems to occur primarily due to server load and I can force them by making allot of exports at the same time.
    In regards to the Dynamic Content Rules I think that you might be able to make the rules one/two rules at the time. What I would test is to make a Dynamic Content with only the default content. Then loop through your rules and only have new rules in the Rules section of the Dynamic Content.
    One more thing. Try using the REST/2.0 endpoint.

  • Print PLSQL Dynamic content region in PDF format in Oracle Apex

    Hi All,
    I have created a report region by selecting "PLSQL Dynamic Content".This region calls the procedure with some parameters.So i want this plsql dynamic content to be in PDF format.
    For an easy understanding, I have created an application in Apex.Oracle.Com where i have created a Plsql Dynamic content which calls procedure do display in region.
    Step 1: http://apex.oracle.com/pls/apex/f?p=4550:1:15635986742760:::::
    Step 2: Workspace : dev_dilip
    Username: [email protected]
    Pwd : 123456
    Step 3: Open PRINT_PDF application and Run the application.
    Step 4: Username: [email protected]
    Pwd : 123456
    The procedure code can be viewed by object browser.
    Once user cliks PDF (button inapplication) a new tab should open and that plsql region should in PDF format.
    I kindly request all to check and advice me with your valuable suggestion.
    regards,
    Doddi Dilip.

    SO, you want to print the output of the procedure in pdf format? If so, you can try apex Report Query feature. You can find a number of examples for the same in this forum and in the internet:
    http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/hol08/apexprnt/apexprnt_otn.htm
    Or, have a IR based on a collection; the collection based on a function returning query. And then, use the IR's generic download option to print reports.
    http://www.oracleapplicationexpress.com/tutorials/71

  • Print multiple pages with dynamic data from same movieclip

    Hi @ all,
    like much of us i have a problem with printjob.
    I have a printjob routine, that starts a new job, then
    handles the following in a loop for printing multiple pages:
    1. update content for every page in a sprite. every loop it's
    the same sprite. the sprite is visible on stage
    2. addPage to Printjob
    after that sends the printjob to the printer
    Now the Problem:
    On Windows it runs perfectly. On Mac only the last page was
    printed. the other pages before are empty (white).
    Has anyone a idea?
    Thanks for answeres.
    Her's my code. As you can see i try to print a table on
    multiple pages. In every loop i only show the rows for the actually
    printing page:

    the printview function only updates the content in the sprite
    that will be printet on every page.
    it generates the rows of a table that will be printed on the
    actual page and return if all rows are printed (true or false)
    this is a very slim function. there is no time overflow or
    sth. like this.

  • Problem with "PL/SQL Dynamic Content" and displaying rows

    hi,
    im new to APEX, and pl/sql [but not web dev or sql].
    ive found the bit in APEX that lets you add data from your DB using the 'CREATE' > 'PL/SQL Dynamic Content'.
    maybe there's a better option for people who dont know pl/sql? i dont know?
    however, i think i can getting working with a little bit of help but im stumbling around in the dark a bit here.
    ok so this is the pl/sql ive come up with to show three example values on page 23 of my aplplication:
    BEGIN
    SELECT ID, NAME, OWNER
    FROM COM_MAILSHOTS
    INTO :P23_ID, :P23_NAME, :P23_OWNER;
    END;
    im getting the error:
    1 error has occurred 
    ORA-06550: line 5, column 21: PL/SQL: ORA-00933: SQL command not properly ended ORA-06550: line 4, column 1: PL/SQL: SQL Statement ignored
    thanks for reading!

    Metabaron wrote:
    hi,
    im new to APEX, and pl/sql [but not web dev or sql].
    ive found the bit in APEX that lets you add data from your DB using the 'CREATE' > 'PL/SQL Dynamic Content'.
    maybe there's a better option for people who dont know pl/sql? i dont know?
    The easiest (and best) way to "display rows" is using a report. Dynamic PL/SQL regions are more complex and are required much less frequently.
    The Oracle® Database 2 Day + Application Express Developer's Guide tutorial explains how to create reports and other basic APEX techniques.

  • Spry Tabbed panels + Progressive Enhancement and Dynamic Loading of Content With Spry

    Is there any way to combine tabbed panels together with "Progressive Enhancement and Dynamic Loading of Content With Spry"?
    Visit: http://labs.adobe.com/technologies/spry/articles/best_practices/progressive_enhancement.ht ml#updatecontent
    And click on the "Using Spry.Utils.updateContent()"
    The 3rd example shows how to use a fade transition whenever the content changes.
    I already have tabbed panels. My menu contains buttons (on tabs) and my Content div contains the panels.
    Tabs code;
    <ul class="TabbedPanelsTabGroup">
              <li class="TabbedPanelsTab">
                   <table class="Button"  >
                        <tr>
                        <td style="padding-right:0px" title ="Home">
                        <a href="javascript:TabbedPanels1.showPanel(1);" title="Home" style="background-image:url(/Buttons/Home.png);width:172px;height:75px;display:block;"><br/></a>
                        </td>
                        </tr>
                   </table>
              </li>
    etc
    etc
    etc
    and the panel code:
    <div class="TabbedPanelsContent" id="Home">
         CONTENT
    </div>
    I hoped i can use the example code from the link into my tabbed panels.
    I thought this code:
    onclick="FadeAndUpdateContent('event', 'data/AquoThonFrag.html'); return false;"
    could be added to the tab code like this:
    <a href="javascript:TabbedPanels1.showPanel(1);" onclick="FadeAndUpdateContent('event', 'data/AquoThonFrag.html'); return false;" title="Home" style="background-image:url(/Buttons/Home.png);width:172px;height:75px;display:block;"><br/></a>
    But the content doesnt fade...
    I know i need to change the header etc.
    The following is from the link:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Aquo Events</title>
    <script src="../../../includes/SpryEffects.js" type="text/javascript"></script>
    <script src="../../../includes/SpryData.js" type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    function FadeAndUpdateContent(ele, url)
    try {
         Spry.Effect.DoFade(ele,{ duration: 500, from: 100, to: 0, finish: function() {
              Spry.Utils.updateContent(ele, url, function() {
                        Spry.Effect.DoFade(ele,{ duration: 500, from: 0, to: 100 });
    }catch(e){ alert(e); }
    -->
    </script>
    <style type="text/css">
    /* IE HACK to prevent bad rendering when fading. */
    #event { background-color: white; }
    </style>
    </head>
    So i changed my header etc, put the SpryEffects.js and SpryData.js into position and nothing changed...
    Is there a way to keep my tabbed panel (or change as less as possible) and let
    A. The fade work
    B. The loading work.
    The problem now is that it loads all pages instead of only the home. Therefore i wanted this Progressive Enhancement.
    And the fading part is just because its nice...

    It doesnt show in the post but off course i changed this link;
    "data/AquoThonFrag.html"
    into;
    "javascript:TabbedPanels1.showPanel(1);"
    I must say i dont know if this even works...

  • InContext editing error: This region contains content with dynamic behavior added..

    We just set up a web site with InContext editing following the procedures in Business Catalyst documentation to do that. But now when we go to the administration section of the site, and turn on InContext editing, it won't let us update the text. We receive an error message:
    "This region contains content with dynamic behavior added..."
    Does anyone know what causes this problem, and how to fix it?

    Hi,
    InContext Editable (ICE) regions can only contains static areas like text and static  assets, it cannot wrap around javascript – populated areas or dynamic content like slideshows. (most likely causing the error)
    ICE can edit only static page content such as regular HTML content. It cannot edit any element that is dynamically updated for example a div (or another element) which is manipulated (created or its contents are modified) by JS– populated areas or dynamic content like slideshows. It cannot edit menus, content holders or content outputted by system modules or tags either.
    By default, on a page that has no ICE editable regions defined the editor attempts to find any regions you might want to edit and if possible make them editable. If it does not find the correct regions you want to edit you will need to explicitly define some editable regions.
    Refer to this article on Defining InContext Editing editable regions - http://kb.worldsecuresystems.com/838/cpsid_83855.html?bc-partner
    Hope this helps!
    -Sidney

  • How to fill my collapsible panels with dynamic content from PHP scripts?

    Hi people,
    I'm trying to generate dynamically generated content in a
    Spry collapsible panel. Previously I've generated PHP files that as
    an output generates a dynamic table with the data I want to show. I
    figured it would be possible to use an php include option to
    generate this table in a content section of a Spry collapsible
    panel. However, when I do this the collapsible panels appear to
    join and when panel1 is clicked all tables close instead of only
    panel 1 and all tables are put benath each other without putting it
    in each seperate panel. But when i replace the file with only the
    text "content" it works fine. Do i maybe have to add some kind of
    command at the end of my php file to make it look like the
    "content"-text or is this not the problem?
    I've been looking for the answer now for a couple of weeks on
    various forums and nothing seemed to work for me. Can please
    somebody help me out?
    Greets,
    Damian
    The code in its non working form:
    <head>
    <!--Link the CSS style sheet that styles the Collapsible
    Panel-->
    <link href="SpryAssets/SpryCollapsiblePanel.css"
    rel="stylesheet"
    type="text/css" />
    <!--Link the Spry Collapsible Panel JavaScript
    library-->
    <script src="SpryAssets/SpryCollapsiblePanel.js"
    type="text/javascript"></script>
    </head>
    <body>
    <!--Create the Collapsible Panel widget and assign
    classes to each element-->
    <div id="CollapsiblePanel1" class="CollapsiblePanel1">
    <div class="CollapsiblePanelTab">Tab</div>
    <div class="CollapsiblePanelContent"><?php
    include('details_books.php');?></div>
    </div>
    <div id="CollapsiblePanel2" class="CollapsiblePanel2">
    <div class="CollapsiblePanelTab">Tab</div>
    <div class="CollapsiblePanelContent"><?php
    include('details_authors.php');?></div>
    </div>
    <!--Initialize the Collapsible Panel widget object-->
    <script type="text/javascript">
    var CollapsiblePanel1 = new
    Spry.Widget.CollapsiblePanel("CollapsiblePanel1");
    </script>
    <script type="text/javascript">
    var CollapsiblePanel2 = new
    Spry.Widget.CollapsiblePanel("CollapsiblePanel2");
    </script>
    </body>

    you need to save the page as a php page (.php) It works
    fine

  • head content & dynamic metadata with APEX?

    Most government and public sector work now mandates the inclusion of various forms of metadata located in the page header, such as [Dublin Core|http://www.ietf.org/rfc/rfc5013.txt], keywords and PICS information. Usually this information is included as name/value pairs using [&lt;meta&gt;|http://www.w3.org/TR/REC-html40/struct/global.html#h-7.4.4.2] elements.
    I wondered what techniques are being used in APEX to inject this (and other) information into the page header, when it needs to be determined dynamically from parameter values and retrieved from the database?
    In a recent Oracle Portal project this proved less straightforward than hoped. Convinced things would prove easier in APEX I've considered 3 approaches so far:
    1. If the elements are fixed for the page, the metadata elements can of course simply be typed into the page HTML Header (why doesn't Portal have this?!)
    2. With a small number of fixed elements with dynamic content, include e.g. &lt;meta name="keywords" value="&KEYWORDS." /&gt; elements in the HTML Header or page template header, and generate the substitution value using application items and computations.
    3. For a variable number of elements or other more complex scenarios, move the &lt;/head&gt; tag into the page template body ([still find the division of the page template definition baffling|http://forums.oracle.com/forums/thread.jspa?messageID=1289074&#1289074]) and put a region position placeholder (e.g. #REGION_POSITION_04#) before &lt;/head&gt;. A template-less PL/SQL Dynamic Content region can now be set at this display point to call whatever PL/SQL is necessary to inject elements using htp.meta or htp.p.
    Any other thoughts?
    Edited by: fac586 on Oct 9, 2008 9:26 PM
    Just discovered #REGION_POSITION_04# is substituted in the page definition header area. Said I found that confusing...

    I am used to do that all the time at www.spesadove.it where i generate the title, the page description, the keywords basing on the content of certain database tables. See an example here:
    http://www.spesadove.it/pls/apex/f?p=19883:10:0:::RP:P10_SALE_ID:383
    In short, i set the value of certain items in before header computations, then i retrieve the value inside meta tags by using substitution strings like &P0_KEYWORDS. or &P0_TITLE.
    Bye,
    Flavio
    http://www.oraclequirks.com

  • Create Portal Page Design with Dynamic content in Moss2007(without using Visual Studio)

    Hi All,
    I am facing a issue while designing a page in MOSS 2007. I can't use custom code as the client doesn't want it to be used.
    The page is with dynamic content coming from sharepoint lists and picture library. I tried using SharePoint Listview after adding zones as per my page design..but was unsuccessful because I am unable to change its design and css styles in its xslt view.
    Plesae help me to find any alternative so that I can easily style my page with the dynamic content. Is there any way using Content editor webparts? Can we get List data in Content editor html as this can be easily styled. I googled and tried it by using javascript
    and jquery but again unsuccessful.
    Please help me with some solution.
    Thanks..!!

    I recommend your repost this in the WebLogic Portal forum.
    WebLogic Portal

  • Need some help with dynamic content

    Okay so I have made a whole site design from the ground up, yea I know thats the easy part haha. Well now we have came into a problem in the coding aspect of the design. For the site we have dynamic content involved that is coded with PHP/HTML. The website contains a user system that requires them to log into view the content of the page.
    Well the issues I am having is I can not get flash to load this external file into a frame I have designated for it. Im not sure if flash can load external PHP/HTML and I need help to figure this issue out since I am new to Flash.
    Thank you for your time,
    Chris.

    One other thing you might try searching for, though to me it's just vague hearsay...  Someone may have written a class that can be use which enhances Flash's limited html capabilities and allows for thml content to be displayed (possibly being its own version of a browser of sorts)... but like I said, it's only hearsay to me, assuming I'm remembering the right hear.

  • Programm an static Design with dynamic Content

    Hello... I have an problem. I want programm an static design and and static menue, but the content must be dynamic. I know how it work with frames, but how does it work with an site only with tables... like this:
    http://www.galaxy-news.de/
    The menu is static but the content is dynamic and is work without frames.. But how? In the faces-config.xml is just an frame value:
    <navigation-case>
    <from-outcome>ok_next</from-outcome>
    <to-view-id>/masterDetail.jsp</to-view-id>
    </navigation-case>
    How does it work without frames. Here an example what I mean. It is an site with JSF without frames, but static design and dynamic content:
    http://www.irian.at/open_source.jsf
    Thanks for help

    <select name="gallerySelect" id="gallerySelect" onchange="dsGalleries.setCurrentRowNumber(this.selectedIndex);" spry:repeatchildren="dsGalleries" spry:choose="choose">
            <option spry:when="{ds_RowNumber} == {ds_CurrentRowNumber}" selected="selected">{sitename}</option>
            <option spry:default="default">{sitename}</option>
          </select>
    If i understand you correctly you want to use links, instead of a select.. You can do it like this:
    <ul spry:repeatchildren="dsGalleries">
         <li><a href="#{ds_RowNumber}" onclick="dsGalleries.setCurrentRowNumber(this.href.replace(/\#/g,''));">{sitename}</a></li>
    </ul>

Maybe you are looking for

  • Low mic

    someone once wrote: "I just got my iPhone 3GS a week ago and i got some issues with it. First i have to say that it's a lot faster than my iPhone 3G. After few days the phone suddenly got hot and sucked out my battery. After charging it to 100% durin

  • Database changes during pool pairing in lync 2013

    Hi, I am planning for pool pairing.Can anyone tell what all database get copied on bacup pool.Do we need extra storage for pairing. will all previous lcscdr & lcslog get copied to backup pool?

  • Whycan't  i move songs manually  around in playlists

    why can't i manually move songs around in playlist

  • RE-installation

    Good Morning I installed the Master Collection of the Acarobat Proffessional/Adobe Design std/InDesign and etc.  After working with the software for a week my computer had issues, and was reset by my IT department.  Thus I now have to RE-Install all

  • Items and costs

    Hi All Happy New year to all i have two quiries 1) how can we update parts in inventory 2) what is standard costs and how can we load it? plz advice me Thanks in advance