Dynamic image in header

Hello,
I've been starting to use Livecycle designer (version 8 it seems) a few weeks ago and I am currently confronted to a problem that I can't to solve.
Basically, I need to create a Fragment that serves as a header for multiple documents.
This Fragment contains an image field that changes depending on certain values on my form and of course, being a header, it is placed in the master page.
Now, for some reason,the fragment works if my it is placed in the main page, but doesn't display any image if I place it in my master page.
I have been using the following code to load the image:
imageField.value.image.href = "../Pictures/myPicture.png";
Alternatively, I have also tried to use a dynamic image field with the same code, and although it displays the picture in Designer (even when in the masterpage), the pdf is "corrupted" when I load it from Livecycle.
Am I taking the wrong approach here? Is there anything that I can do?
Thank you for any light you can shed on the matter.

Hi,
Don't have a complete answer, but you might get some indication for working with images here: http://assure.ly/mcFrC6.
You should also have a look at John Brinkman's post: http://blogs.adobe.com/formfeed/2009/11/linked_vs_embedded_template_im.html.
If you are using an ImageField object on the Master Page you might need to set its binding to Global. So that as new pages are rendered on the form, the image will be displayed.
In relation to the href, I believe that you are hitting a security restriction.
I am not sure how best to get the image in from LiveCycle, maybe someone else will have a better view.
Good luck,
Niall

Similar Messages

  • Dynamic Images in PDF Report

    Hi,
    I want to create Badges from employee table (ID, NAME, JOB_TITLE, PHOTO). I downloaded and installed a demo application "USING DYNAMIC IMAGES IN PDF REPORT". It works fine with smale images < 20K. I'm getting the following error for images > 20K :
    "ORA-06502: PL/SQL: numeric or value error: raw variable length too long"
    it seems like a buffer problem.
    could you pls help to solve this problem
    Thanks,
    Ribhi

    Hi Carsten
    That was exactly* I was looking for. Maybe I should Google more in German ;-)
    The main problem was that I defined my image outside the first repeating group (that doesn't repeat, it's always just one object) - the first group is followed by 7 more.
    Just like the "Name" (that's positioned outside the group in the document header), I positioned the image above the table representing the group.
    Doing that, the "Name" is filled correctly, the Image only when the Output Format is Excel or HTML - not Word or PDF ... makes no sense but that's tje way it is.
    After moving the image inside the group....it works great!
    (One more thing...the image size is fixed to the image you use as "dummy". Is there any way to make that more flexible, because now some scaling happens...)???
    @Trent: That was the way we initially did it, but when the size of the row exceeds 32K...you know what happens.. And even with a small image the 32K limit is hit easily
    The way I use it now (very similar to Carsten's description) there is no limit....
    Thank you all!
    Roel

  • Showing dynamic images in BI Publisher PDF report

    I defined a RTF report layout in BI Publisher. Almost done, but one requirement missing...
    I should be able to include a dynamic image (so every "object" on the report has it's own image).
    At first I embedded the base64 converted image in the XML output, but then I am running into the 32K limit. (Small pictures render fine).
    Although Marc Sewtz sort of promised in June 2008 (!) : "One issue, which we'll address in the next version of Application Express, is the 32k limit on report columns." on his blogpost http://marcsewtz.blogspot.com/2008/06/one-question-about-pdf-printing-feature.html , it still not addressed.
    So I tried to embed the image in the report using a trick described on the forum (and BIP documentation), by embedding a dummy picture and set the "Alt-text" of the picture to
    (as an example) : url:{'http://www.oracleimg.com/us/assets/oralogo-small.gif'}.
    The strange thing is, that works fine for HTML Output and Excel output, but not for Word and PDF (why it does work for Excel and not for Word is very mysterious....). And of course I need a PDF output.
    I also tried to embed a FO snippet:
    <fo:block>
    <fo:external-graphic src="url:{'http://www.oracleimg.com/us/assets/oralogo-small.gif'}" />
    </fo:block>
    But that doesn't (seem to) work on any output...
    But
    <fo:block>
    <fo:external-graphic src="D:\Users\rhartman\Documents\PrintScreen Files\Screenshot004.jpg" />
    </fo:block>
    does produce the image on the PDF output.
    So who has an idea how to solve this issue?? You'll be rewarded with a lot of pionts ;-)
    TIA
    Roel

    Hi Carsten
    That was exactly* I was looking for. Maybe I should Google more in German ;-)
    The main problem was that I defined my image outside the first repeating group (that doesn't repeat, it's always just one object) - the first group is followed by 7 more.
    Just like the "Name" (that's positioned outside the group in the document header), I positioned the image above the table representing the group.
    Doing that, the "Name" is filled correctly, the Image only when the Output Format is Excel or HTML - not Word or PDF ... makes no sense but that's tje way it is.
    After moving the image inside the group....it works great!
    (One more thing...the image size is fixed to the image you use as "dummy". Is there any way to make that more flexible, because now some scaling happens...)???
    @Trent: That was the way we initially did it, but when the size of the row exceeds 32K...you know what happens.. And even with a small image the 32K limit is hit easily
    The way I use it now (very similar to Carsten's description) there is no limit....
    Thank you all!
    Roel

  • Dynamic image displays depending on yes / no value

    Dynamic image displays depending on yes / no value    
    I´d like to have a image showing, depending on a specific value (y/n)
    ..sorry need some help.
    I can´t get it workin.....
    <img <?php $status="n";
    if ($status == "y") {
      echo 'src="stecker_on.png" alt="yes"';
    } else {
      echo 'src="stecker_off.png" alt="no"';
    } ?> height="71" width="101" />
    The image ist not showing... ideas ?
    All I get ist some text showing:
      height="71" width="101" />
    MANY THANKS !!!!

    Presumably you mean this -
    http://mediaconsults.de/1test/steckertest.php
    And it's not clear what that is going to show me.  Looking at the code on the page -
    <html>
    <head>
    <title>Unbenanntes Dokument</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <script language="JavaScript" type="text/JavaScript">
    <!--
    function MM_reloadPage(init) {  //reloads the window if Nav4 resized
      if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
        document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
      else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
    MM_reloadPage(true);
    //-->
    </script>
    </head>
    <body background="test%20png.png">
    <div id="Layer1" style="position:absolute; left:1290px; top:246px; width:95px; height:112px; z-index:1"><img src="stecker_off.png" alt="no"height="101" width="71" /></div>
    </body>
    </html>
    I would advise you the following:
    1.  Put a valid and complete doctype on that page!
    2.  Get rid of the resize if NN4 javascript - it hasn't been needed for nearly a decade.
    3.  Fix your image code (note the missing space after "no"!
    4.  1290px is way too wide unless you want lots of people scrolling right to see things.

  • Dynamic image gallery on detail page

    I have a master page listing 8 products. I have inserted a dynamic image gallery on the detail page which looks ok, but has one major flaw: when you click on a thumbnail the main image opens on the wrong page. e.g. if you click on page ../dragons.php?id=3 the main image opens on  ../dragons.php/id=1 and shows the following url: .../dragons.php?image=btf.jpg (or whatever the image file name).
    I have only just started using php and I would appreciate some guidance on how to resolve this problem.
    The relevant sections of the code are as follows?
    $vardragon_dragons_species = "1";
    if (isset($_GET['id'])) {
      $vardragon_dragons_species = $_GET['id'];
    mysql_select_db($database_cjwebsite, $cjwebsite);
    $query_dragons_species = sprintf("SELECT dragons.Order, dragons.family, dragons.Latin, dragons.English, dragons.Img1, dragons.Img2, dragons.Img3, dragons.img4, dragons.Img5, dragons.text, `dragons gallery`.filename, `dragons gallery`.caption, dragons.id, `dragons gallery`.image_id, dragons.id FROM dragons, `dragons gallery` WHERE dragons.id = `dragons gallery`.image_id AND dragons.id=%s", GetSQLValueString($vardragon_dragons_species, "int"));
    $dragons_species = mysql_query($query_dragons_species, $cjwebsite) or die(mysql_error());
    $row_dragons_species = mysql_fetch_assoc($dragons_species);
    $totalRows_dragons_species = mysql_num_rows($dragons_species);
    if (isset($_GET['image'])) {
      $mainImage = $_GET['image'];
    else {
      $mainImage = $row_dragons_species['filename']; }
    <body>
      <div class="main_image"><img src="../images/dragons/<?php echo $mainImage; ?>" alt="<?php echo $row_dragons_species['caption']; ?>" />
      <div class="capt"><?php echo $row_dragons_species['caption']; ?></div>
    <ul class="gallery">
            <?php do {
          if ($row_dragons_species['filename'] == $mainImage) {
                     $row_dragons_species['caption'];
                   }?>
      <li><a href="<?php echo $_SERVER['PHP_SELF'];?>?image=<?php echo $row_dragons_species['filename']; ?>"><img src="../images/dragons/thumbs/<?php echo $row_dragons_species['filename']; ?>" alt="<?php echo $row_dragons_species['caption']; ?>"  /></a></li>
      <?php } while ($row_dragons_species = mysql_fetch_assoc($dragons_species)); ?>
      </ul>
    Many thanks
    CJ 

    I'm still at an early stage in building this site and because it is allvery experimental I am and just using local testing.
    So to try to explain my objective. I have a master page with 8 products  there is a link to a detail page based on product id. So from the master page (dragons.php) you can select a product which will show the product information on a detail page (eg. dragons_species.php?id=1 or dragons_species.php?id=2 etc). This works ok.
    Each detail page has various pieces of information and 5 images. I wanted to show the images in an image gallery format and so used the code you provide in your book PHP Solutions (Creating a Dynamic Online Gallery pp.323-330). This works ok on the first page where id=1, but on subsequent pages (id=2, id=3 etc) I am loosing the id link infavour of an image based link.
    This is the complete script for my detail page (dragons_species.php)
    <?php require_once('../Connections/cjwebsite.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $vardragon_dragons_species = "1";
    if (isset($_GET['id'])) {
      $vardragon_dragons_species = $_GET['id'];
    mysql_select_db($database_cjwebsite, $cjwebsite);
    $query_dragons_species = sprintf("SELECT dragons.Order, dragons.family, dragons.Latin, dragons.English, dragons.Img1, dragons.Img2, dragons.Img3, dragons.img4, dragons.Img5, dragons.text, `dragons gallery`.filename, `dragons gallery`.caption, dragons.id, `dragons gallery`.image_id, dragons.id FROM dragons, `dragons gallery` WHERE dragons.id = `dragons gallery`.image_id AND dragons.id=%s", GetSQLValueString($vardragon_dragons_species, "int"));
    $dragons_species = mysql_query($query_dragons_species, $cjwebsite) or die(mysql_error());
    $row_dragons_species = mysql_fetch_assoc($dragons_species);
    $totalRows_dragons_species = mysql_num_rows($dragons_species);
    if (isset($_GET['image'])) {
      $mainImage = $_GET['image'];
    else {
      $mainImage = $row_dragons_species['filename']; }
    ?>
    <!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">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Odonata Species</title>
    <link href="../Css/dragons.css" rel="stylesheet" type="text/css" />
    <link href="../Css/menu.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <div id="header">
      <?php include('../Includes/logo2.inc.php'); ?>
    </div>
    <div id="content"> <div id="title">
      <h1>Damselflies &amp; Dragonflies</h1>
    </div>
    <div class="family")><?php echo $row_dragons_species['Order']; ?></div>
    <div class="subfamily">
      <?php echo $row_dragons_species['family']; ?>
      <div class="main_image"><img src="../images/dragons/<?php echo $mainImage; ?>"   alt="<?php echo $row_dragons_species['caption']; ?>" />
       <div class="capt"><?php echo $row_dragons_species['caption']; ?></div></div></  
       <div class="description">
        <div class="text" id="name"><?php echo $row_dragons_species['Latin']; ?></div>
        <div  id="vernname"><?php echo $row_dragons_species['English']; ?></div>
      <?php echo $row_dragons_species['text']; ?></div>
    <ul class="gallery">
            <?php do {
                      if ($row_dragons_species['filename'] == $mainImage) {
                     $row_dragons_species['caption'];
                   }?>
    <li><a href="<?php echo $_SERVER['PHP_SELF'];?>?image=<?php echo $row_dragons_species['filename']; ?>"><img src="../images/dragons/thumbs/<?php echo $row_dragons_species['filename']; ?>" alt="<?php echo $row_dragons_species['caption']; ?>"  /></a></li>
      <?php } while ($row_dragons_species = mysql_fetch_assoc($dragons_species)); ?>
      </ul>
      <div id="footer">
        <?php include('../includes/footer.inc.php'); ?>
    </div></div>
    </div>
    </body>
    </html>
    <?php
    mysql_free_result($dragons_species);
    ?>
    The code for my master page dragons.php is as follows
    <?php require_once('../Connections/cjwebsite.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    mysql_select_db($database_cjwebsite, $cjwebsite);
    $query_dragons_species = "SELECT id, Latin, English, Thumbs FROM dragons";
    $dragons_species = mysql_query($query_dragons_species, $cjwebsite) or die(mysql_error());
    $row_dragons_species = mysql_fetch_assoc($dragons_species);
    $totalRows_dragons_species = mysql_num_rows($dragons_species);mysql_select_db($database_cjwebsite, $cjwebsite);
    ?>
    <!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">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Odonata</title>
    <link href="../Css/menu.css" rel="stylesheet" type="text/css" />
    <link href="../Css/dragons.css" rel="stylesheet" type="text/css" />
    <body>
    <div id="header">
    <?php include('../Includes/logo2.inc.php'); ?></div>
    <div id="content"> <div id="title">
    <h1>Damselflies</a> & Dragonflies</h1>
    <div id="sidebar">
    <?php include('../Includes/menu2.inc.php'); ?>
    <div id="text">
    <h2>ODONATA</h2>
        </h2>
      <p>Ten species have been recorded on the islands, of which seven are common and widely distributed. The Golden-ringed Dragonfly and the Emerald Damselfly are both very scarce, whilst the record of the Azure-winged Dragonfly on Lewis is unconfirmed.   
           <?php do { ?>
        <div class="speciesbox"><a href="Dragons_species.php?id=<?php echo $row_dragons_species['id']; ?>"><img src="../images/dragons/thumbs/<?php echo $row_dragons_species['Thumbs']; ?>" /></a>
            <div class="latin"><a href="Dragons_species.php?id=<?php echo $row_dragons_species['id']; ?>"><?php echo $row_dragons_species['Latin']; ?></a>
              <div class="english"><a href="Dragons_species.php?id=<?php echo $row_dragons_species['id']; ?>"><?php echo $row_dragons_species['English']; ?></a> </div>
        </div></div>
      <?php } while ($row_dragons_species = mysql_fetch_assoc($dragons_species)); ?> </div>
    <div id="footer">
        <?php include('../includes/footer.inc.php'); ?>
    </div>
    </body>
    </html>
    <?php
    mysql_free_result($dragons_species);
    ?>
    Does this shed any light?
    Many thanks
    CJ.

  • Dynamic Image Watermarking

    Hi All,
    I have a requirement to dynamically insert the Image watermark depending on the Organization which i get from my XML output. For example
    IF
    <ORGANIZATION>Org1</ORGANIZATION>
    THEN insert Org1.jpg as image watermark
    IF
    <ORGANIZATION>Org2</ORGANIZATION>
    THEN insert Org2.jpg as image watermark
    I already tried using the dynamic imaging method according to the link below:
    http://blogs.oracle.com/xmlpublisher/2006/05/dynamic_images.html
    It's working fine if i use image *(url)* as part of my template but not as the watermark
    I also tried using the Subtemplate but this is calling only my template but not the image watermark
    Please let me know if i am missing some thing or if there is any other way to handle this.
    Thanks,
    Prasanth

    Presumably you mean this -
    http://mediaconsults.de/1test/steckertest.php
    And it's not clear what that is going to show me.  Looking at the code on the page -
    <html>
    <head>
    <title>Unbenanntes Dokument</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <script language="JavaScript" type="text/JavaScript">
    <!--
    function MM_reloadPage(init) {  //reloads the window if Nav4 resized
      if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
        document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
      else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
    MM_reloadPage(true);
    //-->
    </script>
    </head>
    <body background="test%20png.png">
    <div id="Layer1" style="position:absolute; left:1290px; top:246px; width:95px; height:112px; z-index:1"><img src="stecker_off.png" alt="no"height="101" width="71" /></div>
    </body>
    </html>
    I would advise you the following:
    1.  Put a valid and complete doctype on that page!
    2.  Get rid of the resize if NN4 javascript - it hasn't been needed for nearly a decade.
    3.  Fix your image code (note the missing space after "no"!
    4.  1290px is way too wide unless you want lots of people scrolling right to see things.

  • Dynamic Images Scroller - Almost Finished

    Ciao Guys,
    I am developing a Dynamic Images Scroller , It is almost
    finished (even if it is still a bit rough)
    Since I am a self-taught coder, I had to build the whole
    project using different tutorials.
    The scroller is XML driven and display the images which move
    from left to right. When one of the images is clicked:
    The scrolling STOPS.
    The image clicked is enlarged
    And the other pictures are scaled and faded away.
    (No problem up to this point)
    Then once the Enlarged picture is clicked again everything
    should come back to the initial status.
    My issue is that I haven’t be able to
    “restart” the function which move the images along the
    stage.
    Once the enlarge image is clicked I delete the function which
    scroll the image but How I should lunch it again?
    Here is my messy code, Please help me and I’ll buy you
    a beer when you are in London.
    I am using AS2 and flash player 8

    Hi Carsten
    That was exactly* I was looking for. Maybe I should Google more in German ;-)
    The main problem was that I defined my image outside the first repeating group (that doesn't repeat, it's always just one object) - the first group is followed by 7 more.
    Just like the "Name" (that's positioned outside the group in the document header), I positioned the image above the table representing the group.
    Doing that, the "Name" is filled correctly, the Image only when the Output Format is Excel or HTML - not Word or PDF ... makes no sense but that's tje way it is.
    After moving the image inside the group....it works great!
    (One more thing...the image size is fixed to the image you use as "dummy". Is there any way to make that more flexible, because now some scaling happens...)???
    @Trent: That was the way we initially did it, but when the size of the row exceeds 32K...you know what happens.. And even with a small image the 32K limit is hit easily
    The way I use it now (very similar to Carsten's description) there is no limit....
    Thank you all!
    Roel

  • Dynamic image is not being displayed in Adobe Reader 8.1

    Hi,
    In interactive form, we have followed below required steps to show a dynamic image.
    For the left image, drag and drop an Image Field element from the standard Library tab to the Body Pages pane. Select this image field and edit the following properties:
    • Click on the Layout tab and choose None for the Caption position.
    • Click on the Object, then the Binding tab and choose None for Default Binding.
    • Click on the Field tab, enter $record.SapOnlineShopUrl for the URL entry, and select Use Image Size for the Sizing field.
    • Click on the script editor and enter the following FormCalc script statement, which enables the dynamic integration of the image. Show: initialize Script: this.value.image.href = xfa.resolveNode(this.value.image.href).value;
    Language: FormCalc Run At: Client
    Image is displayed properly in Adobe reader 7.1 but it's not being displayed in Adobe reader 8.1.
    I was going through some forums and understand that Adobe 8.1 blocks href URL. If this is indeed true, what's the alternative way to show a dynamic image?
    Regards
    Chandra
    Edited by: Chandrashekhar Singh on Apr 24, 2008 7:28 AM

    Soory, I thought its static image....
    Regards,
    Vaibhav Tiwari.
    Edited by: Vaibhav Tiwari on Apr 24, 2008 11:45 AM

  • Dynamic image in the template builder plug-in does not work

    Hi all,
    The documentation says:
    Direct Insertion
    Insert the jpg, gif, or png image directly in your template.
    +...This works obviously+
    URL Reference
    1. Insert a dummy image in your template.
    2. In Microsoft Word's Format Picture dialog box select the Web tab. Enter the following syntax in the Alternative text region to reference the image URL:
    url:{'http://image location'}
    For example, enter: url:{'http://www.oracle.com/images/ora_log.gif'}
    +...This works too when I hardcode an url as url:{'http://www.google.com.tr/images/firefox/mobiledownload.png'}+
    Element Reference from XML File
    1. Insert a dummy image in your template.
    2. In Microsoft Word's Format Picture dialog box select the Web tab. Enter the following syntax in the Alternative text region to reference the image URL:
    url:{IMAGE_LOCATION}
    where IMAGE_LOCATION is an element from your XML file that holds the full URL to the image.
    +...This, however, does not work.+
    I use Apex' report query tool and My query is like
    select 'http://www.google.com.tr/images/firefox/mobiledownload.png' IMAGE_LOCATION from ... (a single result set for my template)
    the xml data is generated with an IMAGE_LOCATION tag. I load it to word template plug-in. The Url successfully displays in the report if I make it a plain-simple field.
    But when it's in the image format->web->alt text as url:{IMAGE_LOCATION} no image displayed.
    I need to keep this design procedure simple so a simple word user could design a report via using just template builder plug-in. I don't wish to explore the xsl-fo area...yet.
    Could you tell me why I can't get this url:{IMAGE_LOCATION} to work?
    Regards
    PS: My BI version: 10.1.3.4.1
    Edited by: oeren on Jun 8, 2011 12:28 AM

    Oeren,
    I stumbled across this little tidbit buried in the BI Publisher forum: Dynamic Images in rtf
    Glad you are up and running!
    Joshua

  • How to display a dynamic image file from url?

    Hey,I want to display a dynamic image file from url in applet.For example,a jpg file which from one video camera server,store one frame pictur for ever.My java file looks like here:
    //PlayJpg.java:
    import java.awt.*;
    import java.applet.*;
    import java.net.*;
    public class PlayJpg extends Applet implements Runnable {
    public static void main(String args[]) {
    Frame F=new Frame("My Applet/Application Window");
    F.setSize(480, 240);
    PlayJpg A = new PlayJpg();
    F.add(A);
    A.start(); // Web browser calls start() automatically
    // A.init(); - we skip calling it this time
    // because it contains only Applet specific tasks.
    F.setVisible(true);
    Thread count = null;
    String urlStr = null;
    int sleepTime = 0;
    Image image = null;
    // called only for an applet - unless called explicitely by an appliaction
    public void init() {
                   sleepTime = Integer.parseInt(getParameter("refreshTime"));
              urlStr = getParameter("jpgFile");
    // called only for an applet - unless called explicitely by an appliaction
    public void start() {
    count=(new Thread(this));
    count.start();
    // called only for applet when the browser leaves the web page
    public void stop() {
    count=null;
    public void paint(Graphics g) {
    try{
    URL location=new URL(urlStr);
    image = getToolkit().getImage(location);
    }catch (MalformedURLException mue) {
                   showStatus (mue.toString());
              }catch(Exception e){
              System.out.println("Sorry. System Caught Exception in paint().");
              System.out.println("e.getMessage():" + e.getMessage());
              System.out.println("e.toString():" + e.toString());
              System.out.println("e.printStackTrace():" );
              e.printStackTrace();
    if (image!=null) g.drawImage(image,1,1,320,240,this);
    // called each time the display needs to be repainted
    public void run() {
    while (count==Thread.currentThread()) {
    try {
    Thread.currentThread().sleep(sleepTime*1000);
    } catch(Exception e) {}
    repaint(); // forces update of the screen
    // end of PlayJpg.java
    My Html file looks like here:
    <html>
    <applet code="PlayJpg.class" width=320 height=240>
    <param name=jpgFile value="http://Localhost/playjpg/snapshot0.jpg">
    <param name=refreshTime value="1">
    </applet>
    </html>
    I only get the first frame picture for ever by my html.But the jpg file is dynamic.
    Why?
    Can you help me?
    Thanks.
    Joe

    Hi,
    Add this line inside your run() method, right before your call to repaint():
    if (image != null) {image.flush();}Hope this helps,
    Kurt.

  • How do get a dynamic image to open in new browser window

    I'm using DW CS3, mysql (MAMP)   OS 10.6.2   I'm designing my online store.  I need the customer to be able to click dynamic image/thumbnails to view a larger image in a new browser pop up window 400 x 400.  An example of this functionality can be seen at :
    http://www.designpublic.com/spot-on-square-roh-dresser
    So far I can get the separate new browser window to open with the dynamic image, using the open new browser behavior, but the on click also advances to next page with the larger image. You have to press the back button to get back to the product page.  I want the customer to be able to see the product page , while viewing larger image, and then close larger image, and still have the product page open. I don't understand why 2 windows are opening.
    Thanks for the help people!
    William

    Hi
    I did look at it but, (and this is only my opinion, I do not like such effects) it is your decision.
    If you view source you will see -
    <a href="#" onclick="popWin('http://www.designpublic.com/catalog/product/gallery/id/12706/image/91883/', 'gallery', 'width=300,height=300,left=50,top=50,location=no,status=yes,scrollbars=yes,resizable=yes'); return false;" title="Spot on Square Roh Dresser" class="gallery-image-link"><img src="http://arcsmedia01.s3.amazonaws.com/catalog/product/cache/2/thumbnail/56x56/5e06319eda06f020e43594a9c230972d/r/o/roh_dresser1.jpg" alt="" /></a>
    Which is controlled by the javascript function
    popWin()
    which you can view using the firefoxe dev toolbar - view javascript function.
    PZ

  • Dynamic Image Displays Blank When Using In Visual Studio Project

    I am trying to simply display a dynamic image in a report. I am using Crystal Reports XI Release 2.
    I have two different environments: Local via Progress where reports are called using Crystal Viewer ActiveX, and over the web where reports are called from Open Laszlo and Visual Studio project.
    The image is set to a blank image as default, and Graphic Location Forumla loads the image from the database (site.logo_location + site.logo_filename) which results in an image http:
    www.vetinfo3.com\a.jpg.
    When I run the reports locally using the ActiveX control, it works just fine and displays the image.
    When I run over the web using OpenLaszlo, it displays a blank.
    Troubleshooting
    We are using Visual Studio 2005, which is bundled with an older version of Crystal that doesn't support dynamic images.
    To address this, I loaded Crystal XI Release 2, which updated the version in Visual Studio and enabled the Graphic Location formula field on the dev machine.
    I verified the Graphic Location field was set correctly.
    This caused a Version error, so we loaded cr_net_2005_mm_mlb_x86.zip on server and specified the Version in web.Config.
    No errors now, but when I build and publish the code, the image still displays as blank.
                From Fiddler
                   GET http://www.vetinfo3.com/mdsol1/CrystalImageHandler.aspx?dynamicimage=cr_tmp_image_c5d6a923-293b-4f1e-8739-4e698f83b087.png
                   Creates C:\Documents and Settings\Curtis\Local Settings\Temporary Internet Files\Content.IE5\PWRUX2XW\CrystalImageHandler[1].png
                   Blank Image
    According to issues within Visual Studio, they say the fix to this is to add the <httpHandler> in web.Config, but it is already there; added when we add the viewer to the project:
    In web.Config I have some questions about this line:
        <httpHandlers>
          <add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
        </httpHandlers>
    There are more service packs for Crystal XI Release 2:
    crXIr2sp2_net_server_install.zip
    crXIr2sp3_net_server_install.zip
    crXIr2sp4_net_server_install.zip
    I have not loaded these yet, but the readme files do not indicate they fix any dynamic image issues.
    I am out of ideas on this; does anyone have any ideas?

    What about if you take OpenLaszlo out of the picture? E.g.; use one of our samples from here;
    https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
    I'd recommend vbnet_web_simplepreviewreport
    Also, see [this|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0437ea8-97d2-2b10-2795-c202a76a5e80] article.
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup

  • Dynamic Images in Crystal Reports

    I have a report with Dynamic Images. I am able to run the report but once I try to export it or try to browse through the pages I get the following error:
    Application popup: Crystal Reports - [Inventory Graphics Report.rpt]: crw32.exe - Application Error : The exception Integer division by zero.
    (0xc0000094) occurred in the application at location 0x2c03a410.

    Hi Don,
    I have read your response 10 times, but I don't really understand it.
    "Your only option is to use the Insert OLE Object or picture into the report" - fine, but how is this achieved from a dataset?
    "CR will not display BLOB fields as pictures" - fine, but maybe I used the word BLOB badly. The dataset column datatype is "byte[]". Will CR display byte[] columns as pictures?
    "You can use a database field to point to which picture file to use, then you won't be using up valuable memory space importing the images into your data set. And the Logo's now dynamic...." - this seems to suggest that the database field is a string storing the file location on disk. Yes? I don't care about memory space in this case and I'm happy to load a binary file into a byte[] column if there is a way of displaying it.
    So, if I understand correctly, you're suggesting the dataset contain a table.row.column which stores the filelocation. How do I convert that to display as a picture (dynamically)?
    Robert

  • How to insert a dynamic image from a database

    I've recently started using Dreamweaver CC to set up a Dynamic Website (PHP pages with a mySQL database).  With perseverance and by downloading the new depreciated Server Behaviors and Bindings Panels I've been more or less successful at accomplishing my tasks.  I'm still struggling with getting a image to display from mySQL server data base.  In the Pre CC revisions this was easy and well documented.  I've downloaded the DMXZone HTML5 Data Bindings extension.  I can almost get accomplish my dynamic image task, but the DMXZone HTML5 Data Bindings extension says I must now get the the "unfinished but working on" DMX Zone Database Extension in addition to the HTML5 Data Bindings Extension to select my data source from the database.
    I'm thinking about dumping Dreamweaver CC altogether and just installing CS6 until the path gets better paved.  Any other ideas?  Sample code?  Work around?  Thanks in advance

    KevinatCirris wrote:
    I've recently started using Dreamweaver CC to set up a Dynamic Website (PHP pages with a mySQL database).  With perseverance and by downloading the new depreciated Server Behaviors and Bindings Panels I've been more or less successful at accomplishing my tasks.  I'm still struggling with getting a image to display from mySQL server data base.  In the Pre CC revisions this was easy and well documented.  I've downloaded the DMXZone HTML5 Data Bindings extension.  I can almost get accomplish my dynamic image task, but the DMXZone HTML5 Data Bindings extension says I must now get the the "unfinished but working on" DMX Zone Database Extension in addition to the HTML5 Data Bindings Extension to select my data source from the database.
    I'm thinking about dumping Dreamweaver CC altogether and just installing CS6 until the path gets better paved.  Any other ideas?  Sample code?  Work around?  Thanks in advance
    Really you would do it like any other piece of information in your database.
    Store the actual images in a folder on your server and the image file name in the database - myImage.jpg
    Then echo it to the page following the convention of your other data which is being echoed onto the page:
    <img scr="images/<?php echo $row_rsRecordSetName['images']; ?> alt="" >
    ['images'] above being the name of the database field in which you stored the image name and $row_rsRecordSetName being the variable created by the recordset (yours will be different)

  • Dynamic Images in PDF and Escaping Special Characters

    I used the following to create my own PDFs with dymnamic images:
    http://marcsewtz.blogspot.com/2012_02_01_archive.html (Dynamic Images in PDF - What 32k Limit? )
    I have installed this application on Oracle's free workspace to test.
    The issue I am having is that when there is a special character in the description, such as <>'"& then the the PDF will not open. I have tried using the dmbs_xmlgen.convert to convert the description but haven't had any luck.
    I'm a complete novice with xml. Any help with this is greatly appreciated.
    Thanks,
    Glen

    I have been able to find a solution, but it's not completely perfect. I have changed the "description" field as follows:
    XMLCdata(replace(description,''&'',''and'')) description,
    The characters greater than (>), less than (<), single qoute('), and double quote (") can now all be in the description and will not cause errors. For some reason, I couldn't get the & not to give an error no matter what I tried, so I just replaced the & with the word "and". This solution will work for my needs, but it would be nice to be able to get the & to display.
    Does anyone know of a way to get the & to display correctly?
    Thanks again,
    Glen
    The complete code I am using is below:
    declare
    l_print_layout clob;
    l_xml_data clob;
    begin
    -- load print layout from database
    for c1 in (
    select layout from eba_pdfimg_layouts where id = :P1_LAYOUT
    ) loop
    l_print_layout := wwv_flow_utilities.blob_to_clob(c1.layout );
    end loop;
    -- generate XML data
    for c2 in (
    select dbms_xmlgen.getxml('
    select
    id,
    file_name,
    mime_type,
    XMLCdata(replace(description,''&'',''and'')) description,
    -- description,
    blob2clobase64(image,''Y'') image
    from eba_pdfimg_images
    ') xml_data from dual
    ) loop
    l_xml_data := c2.xml_data;
    end loop;
    -- download print document
    wwv_flow.g_page_text_generated := true;
    apex_util.download_print_document (
    p_file_name => 'image_demo',
    p_content_disposition => 'ATTACHMENT',
    p_report_data => l_xml_data ,
    p_report_layout => l_print_layout,
    p_report_layout_type => 'rtf',
    p_document_format => :P1_FORMAT
    end;

Maybe you are looking for

  • A fix for the iTunes -- iPhone indefinite sync bug

    Moderators feel free to move this to the appropriate place. I was having this problem for a while now. I'd connect my iphone and it would sync forever. I'd have to manually abort the sync. This led to stuff never actually syncing, and music disappear

  • Can't get an audible purchase to work

    Hi all, Just bought an audiobook with audible, when I click the download it asks me to sign in for audible as I need to authorise my new MBA which is fine, then it says "iTunes wants to make changes. Type your password to allow this." but when I type

  • 4800SE - TV out quality problems

    Hey all, Havn't had to post on this forum too much thankfully, my GeForce4 Ti-4800SE has been working great since I upgraded to my new MB, CPU and PS!   (originally had problems with an underpowered system leading to massive polygon problems) Anyways

  • Favorites trahed Bridge

    Tried to add an internal drive to favorites and it made Bridge completely usless.  I've Uninstalled Photoshop, manually deleted all CS5 and Bridge folders I can find in "program files" and "users".  Also ran the "Clean Script".  After reinstalling CS

  • Exposing REST Service in Oracle SOA 10g.

    Hi, I have a requirement to expose a REST web service. The environment im working on is Oracle SOA 10.1.3.4. Please let me know the way of doing the same. Thanks. Edited by: user577285 on Sep 24, 2012 10:01 AM