Zipped Image not working on MS Windows XP

Hi all,
I have a GUI zipped as a JAR file, which has an internal image which should be shown when starting the application in a directory that does not contain any image files (I use JAI for image manipulation). On Linux, the internal image is correctly unzipped from the JAR; on M$ XP it fails with just any image I tried (JPEG, GIF, PNG, even M$ Bitmap).
Does anybody have a tip for me?
Thanks,
Andreas
<code>
// read internal image
try
debug(Thread.currentThread( ).getStackTrace( )[2].getMethodName( )+" Reading internal image."+ls);
byte[] puffer;
synchronized( o )
InputStream is = (InputStream) getClass ().getResourceAsStream ("/images/"+PREVIEW);
int len = (int) is.available ();
puffer = new byte[len];
is.read (puffer);
is.close ();
System.out.print (ls+"Reading internal image.");
o.notify ();
synchronized( o )
// Use the ImageCodec APIs
ByteArraySeekableStream stream = new ByteArraySeekableStream(puffer);
System.out.println ("Resource size: "+stream.available ()+" bytes.");
String[] names = ImageCodec.getDecoderNames(stream);
for (int i=0; i<names.length; i++)
System.out.println ("Type="+names);
ImageDecoder dec = ImageCodec.createImageDecoder(names[0], stream, null);
RenderedImage im = dec.decodeAsRenderedImage();
IMG = (PlanarImage) PlanarImage.wrapRenderedImage(im);
o.notify ();
catch(Exception mf)
System.out.println ("Could not load internal resource.");
</code>
The M$ error message:
Z:\home\Konverter\dist>java -jar Konverter.jar
Reading settings...
Starting graphics...
Project: Konverter Build #: 1567 Builddate: Tue Feb 21 14:29:27 CET 2006 URL: www.zero29.de
Running in DEBUG mode.
Laying out GUI components...
Reading internal image.Resource size: 18238 bytes.
Type=jpeg
Corrupt JPEG data: premature end of data segment
Could not load internal resource.
done.

Sure, thanks for responding:
<mx:WindowedApplication windowComplete="init()" .........removed excess here
     <mx:Script>
          <![CDATA[
               import mx.core.Window;
               protected var theWIndow:Window;
               protected function init():void{
                    theWindow = new Window();
                    theWindow.open();
          ]]>
     </mx:Script>
</mx:WindowedApplication>
In my actual code I have a mxm component that extends Window, so the Window type would be that instead, but since it directly extends it there is no difference. I am actually using the fb.FBConnect code from the facebook-actionscript-api and its open() call also fails on the pc...that is unless I start the process from a flex Button click, then it all works.

Similar Messages

  • My flash flayer does not work on my Windows 8 Surface Tablet, it also won't let me see if i already

    My flash flayer does not work on my Windows 8 Surface Tablet, it also won't let me see if i already have it installed...

    1.      Are you getting any error message?
    2.      Which browser are you using?
    3.      Were there any recent changes made on the computer prior to the issue?

  • Flash player does not work properly on Windows 7 32 bits

    Hello,
    My flash player does not work properly on Windows 7 32 bits with Firfox and IE8 (lasts versions).
    My Flash player version : 10.0.45.2, but I tried with version 9 too, with same problems.
    I have tried to uninstall, reboot, reinstall several times, ... witch did not worked.
    In fact, it works correctly on some sites, like youtube, but not on some others like :
    http://www.dailymotion.com/ => black screen instead of videos, right click gives flash context menu
    http://www.canalplus.fr/ => videos does not load, right click gives flash context menu
    http://www.myspace.com/ => no audio player, right click gives flash context menu
    some games in http://www.kongregate.com/ => black screen instead of games, right click gives flash context menu
    I have no problem with shockwave in http://www.adobe.com/shockwave/welcome/
    No problem too with flash player on http://www.adobe.com/software/flash/about/
    But in the Global Privacy Settings panel (http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager02.htm l), I cannot change any settings :
    I cannot check boxes,
    My changes are not saved.
    In most of flash animations, videos, ...,
    when I click on parameters, I cannot do anything, even closing.
    when I am in full screen mode, the message "press escape to exit...." does not disappear.
    Last thing, all those problems was not there when I was on Windows XP, few weeks ago, and appear with my registered Windows 7 premium familly edition, with the same hardware configuration...
    Thank you for your help

    Hi eidnolb
    Thanks for your answer.
    This is what I have :
    Verify user permissions
    I have an administrator account.
    I tried (uninstall, install and run) with super-administrator account for same results
    Install the most current version.
    I am running the latest version (10.0.45.2)
    Run the Clean Installer to Fix 3rd Party Flash Player Cleaners
    I did not "clean" my computer.
    Troubleshoot Pop-up blockers
    I have no Pop-up or esle blocker  software.
    Ensure that Internet utilities do not block Flash Player
    I tried (uninstall, install and run) without Avast.
    I have windows 7 firewall. I do not know where I can allow ActiveX  controls and Flash (SWF) content. I do not see anything relative to ActiveX an Flash in allowed program list.
    Fix machine crashes when displaying Flash content
    I have no freez or crash.
    Using IE, Shockwave Flash Object is Enabled and vs 10.0.45.2
    Using FF, I have SWF vs  10.0.45.2 and it is Enabled
    I really do not understand !!
    Thanks,
    Ju'

  • My itunes 11 Home sharing is not working with my windows 7 PC and iPad it shows up on iPad and when I go to share the music app does loading for 3 mins and crashes I am using a virgin super hub router please please please help

    My itunes 11 Home sharing is not working with my windows 7 PC and iPad it shows up on iPad and when I go to share the music app does loading for 3 mins and crashes I am using a virgin super hub router please please please help

    My itunes 11 Home sharing is not working with my windows 7 PC and iPad it shows up on iPad and when I go to share the music app does loading for 3 mins and crashes I am using a virgin super hub router please please please help

  • ExpressCard/34 not working in BootCamp Windows 7 64-bit. Apple's BIOS emulation does not give enough resources.

    MacBook Pro unibody, 15" 2009
    ExpressCard/34 (Card is by Transcend TS-RDF1, JMicron chip for SD card) is not working in BootCamp Windows 7 64-bit. Windows reports:
    "This device cannot find enough free resources that it can use. (Code 12)
    If you want to use this device, you will need to disable one of the other devices on this system."
    Other data points: Card works fine in Mac OSX, worked under Windows XP 32-bit (initially reported same problem, but works after reboot).
    Checking the forums there seems to be no actual device suggested to actually remove that would help the problem. And even if it was, the concept is ridiculous. What other device would you like to remove? Display adapter? Network adapter? No way. I use all available devices and don't want to compromise.
    It seems like BIOS emulation does not allocate enough resources to ExpressCard.
    Are others having the same problem?
    Does anyone have a fix for this?
    Is there anyone at Apple who cares to provide a solution?

    It is not a driver problem, but a problem in the BIOS emulated by bootcamp on some (not all) MBP models. So unless Apple fixes it in bootcamp, there is no real solution. And obviously, Apple doesn't care. They are dropping the Expresscard slot anyway.
    Unfortunately, this poster seems right: http://forums.macrumors.com/showthread.php?t=912259 :
    The 2008/2009 Macbook Pros don't allow to use the ExpressCard slot because of EFI/Bootcamp errors (Windows Vista/7 cannot allocate an IRQ to the slot). You don't need any drivers for using an ExpressCard slot on Windows, you only need the drivers for the corresponding card you are using.
    Bootcamped XP allowed to use the slot, but you could not use hot-plugging.
    And from the Sonnet site ( http://www.sonnettech.com/product/tempo_sata_express34.html ) :
    Tempo SATA ExpressCard/34 not supported under Windows 7 or Windows Vista when running on unibody MacBook Pro computers. The problem is caused by the MacBook Pro's BIOS emulation, which doesn't allocate enough resources to support certain kinds of Expresscard/34 devices, such as a SATA controller, in these operating systems.
    (added link to Sonnet's explanation)

  • HD Audio is not working in bootcamp windows in mac mini 2012

    HD Audio is not working in bootcamp windows in mac mini 2012

    Update to the latest bios: https://forum-en.msi.com/index.php?topic=163918.msg1260356#msg1260356 (Follow the guide)
    >>Clear CMOS<<
    Afterwards update the Intel Management Engine Driver in Windows.
    Reboot and afterwards install current Realtek drivers: http://www.msi.com/service/download/driver-22481.html

  • My sound is not working after downloading windows 10

    My sound is not working after downloading windows 10 please can you help me?

    right click start then select device manager see if there are any yellow ! in triagle symbols next to any device if there is you may need to reinstall the audio driver

  • RH 8 Shed images not working

    1.  Shed images not working as of Nov. 12 2009

    Hi all
    Thanks for all the info - but I'm still stumped. I have tried generating my .chm
    files to the default SSL folders, manually copying all the child chms to the SSL
    folder for the master project, letting RH copy them, generating all chms to an
    external folder... no matter what I do, every time I recompile the master
    project it picks up random old stuff. I have checked and rechecked that my
    merged TOC items are to the latest child chms...
    Sometimes when I recomplie the master project, even the content in that reverts
    back to a previous version, sometimes it doesn't...
    I have looked at the Merged Files list in the hhp file, I have deleted this file
    and started my merge from scratch, I have manually deleted some paths (some
    paths are to directories on the server where any files for this project have
    long since been deleted...) directly in this file, but again every time I
    recompile the master project it picks up random old versions of the child chms (
    and the huge list of old merged files are put back in the hhp file. Even when I
    delete all chms from all locations in the folder I'm working in on my C drive,
    delete all the merged TOC items from the master project, save it, and
    recompile it, the list of old merged files reappears in the hhp file).
    Any more thoughts gratefully received:-)
    Also - I don't have a Baggage Files folder??
    One more thing... If I delete ALL the files under Merged Files in the hhp file using HTML Help Workshop, it crashes

  • Dc7700, window7, machine speaker not working. migrating from window xp to 7

    dc7700, window7, machine speaker not working. migrating from window xp to 7

    Hi:
    Just download and install the latest Realtek HD audio driver from the Realtek site.
    Accept the agreement. Download and install either the first or second driver on the list depending on whether you installed the 32 or 64 bit version of W7.
    http://www.realtek.com.tw/downloads/downloadsView.​aspx?Langid=1&PNid=24&PFid=24&Level=4&Conn=3&DownT​...
    Paul

  • Multitouch on track pad not working when running Windows 8 in boot camp

    Does anyone know a work around on how to resolve the issue of more than one fingers on the trackpad? For example, I use one finger to click a window then another finger to slide/move the window to a different location on the screen. This does not work when running Windows 8 in Boot Camp latest version. Any suggestion is much appreciated.

    very very few gestures are supported in windows
    https://discussions.apple.com/message/24548533#24548533
    if it's a limitation from ms you need to contact them
    if it's a limitation from apples drivers you can use feedback channel
    http://www.apple.com/feedback/

  • Magic Trackpad's One Finger "Tap to Click" Not Working in Login Window?

    Magic Trackpad's *One Finger* "Tap to Click" Not Working in Login Window:
    All of my iMac's accounts have *One Finger* "Tap to Click" turned on (checked) in System Preferences. However, in the Login Window where the user decides which account to login to, the Magic Trackpad's clicking ability does not work even though moving the arrow does work. How do I turn on the Magic Trackpad's ability to click in the Login Window?

    After accidentally pressing down on the Magic Trackpad, I realized the trackpad has tactile feedback, that is, it is a big button that can be pressed down and pop back up like old computer mice. Though this will allow the trackpad to select the account I want to open in the Login Window, it still doesn't explain why "tap to click" isn't working in the Login Window. Nevertheless, my question can be considered as answered.

  • Captcha image not working

    Here is the link to my contact form page:  http://www.healthquestpt.com/hpc/contact.html  The captcha image isnt working and the form doesnt work.  This image is in the directory "scripts/images"
    These are the options I've tried so far:
    <?php $random = rand(0,3); ?>
    <img src="images/img_<?php echo $random; ?>.jpg"/><br />
    <input type="hidden" name="captcha_code" value="<?php echo $random; ?>" />
    <?php $random = rand(0,3); ?>
    <img src="scripts/images/img_<?php echo $random; ?>.jpg"/><br />
    <input type="hidden" name="captcha_code" value="<?php echo $random; ?>" />
    <?php $random = rand(0,3); ?>
    <img src="/scripts/images/img_<?php echo $random; ?>.jpg"/><br />
    <input type="hidden" name="captcha_code" value="<?php echo $random; ?>" />
    I've tried moving the images from the "scripts/images" to the "images" file in the main directory.
    I've tried moving the contact.html into the "scripts" file
    I've tried moving the formmailer.php into the main directory.
    None of the above work so  right now I have the contact.html in the main directory, the formmailer.php & images associated with formmailer in the "scripts" file and another set of the images in the "images" file in the main directory.
    here is the link to the "scripts" folder:  http://www.healthquestpt.com/hpc/scripts/
    Please help.

    Ok den I did it but I only uploaded the index.html and the contact.html pages
    heres the formmail.php code:
    <?php
    // dB Masters' PHP FormM@iler, Copyright (c) 2007 dB Masters Multimedia
    // http://www.dbmasters.net/
    // FormMailer comes with ABSOLUTELY NO WARRANTY
    // Licensed under the AGPL
    // See license.txt and readme.txt for details
    // General Variables
    $check_referrer="no";
    $referring_domains="http://domain.com/,http://www.domain.com/,http://subdomain.domain.com/";
    // options to use if hidden field "config" has a value of 0
    // recipient info
    $charset[0]="UTF-8";
    $tomail[0]="[email protected]";
    $cc_tomail[0]="";
    $bcc_tomail[0]="";
    // Mail contents config
    $subject[0]="Home Physician Care Inquiry";
    $reply_to_field[0]="Email";
    $reply_to_name[0]="Name";
    $required_fields[0]="Name,Phone,Email,Comments";
    $required_email_fields[0]="Email";
    $attachment_fields[0]="";
    $return_ip[0]="yes";
    $mail_intro[0]="The following inquiry has been made:";
    $mail_fields[0]="Name,Address,City,State,Zip,Phone,Email,Comments";
    $mail_type[0]="text";
    $mail_priority[0]="1";
    $allow_html[0]="no";
    // Send back to sender config
    $send_copy[0]="no";
    $copy_format[0]="vert_table";
    $copy_fields[0]="Name,Comments";
    $copy_attachment_fields[0]="";
    $copy_subject[0]="Subject of Copy Email";
    $copy_intro[0]="Thanks for your inquiry, the following message has been delivered.";
    $copy_from[0]="[email protected]";
    $copy_tomail_field[0]="Email";
    // Result options
    $header[0]="";
    $footer[0]="";
    $error_page[0]="";
    $thanks_page[0]="thanks.html";
    // Default Error and Success Page Variables
    $error_page_title[0]="Errors:";
    $error_page_text[0]="Please use your browser's back button to return to the form and complete the required fields.";
    $thanks_page_title[0]="Message Sent";
    $thanks_page_text[0]="Thank you for your inquiry";
    // Antispam Options
    $empty_field[0]="nospam";
    $character_scan[0]="Comments,Name";
    $time_delay[0]="2";
    $captcha_codes[0]="9C2449,EEADC8,77A585,D72838";
    $max_urls[0]="2";
    $max_url_fields[0]="Comments";
    $flag_spam[0]="";
    // options to use if hidden field "config" has a value of 1
    // recipient info
    $charset[1]="";
    $tomail[1]="";
    $cc_tomail[1]="";
    $bcc_tomail[1]="";
    // Mail contents config
    $subject[1]="";
    $reply_to_field[1]="";
    $reply_to_name[1]="";
    $required_fields[1]="";
    $required_email_fields[1]="";
    $attachment_fields[1]="";
    $return_ip[1]="";
    $mail_intro[1]="";
    $mail_fields[1]="";
    $mail_type[1]="";
    $mail_priority[1]="";
    $allow_html[1]="";
    // Send back to sender config
    $send_copy[1]="";
    $copy_format[1]="";
    $copy_fields[1]="";
    $copy_attachment_fields[1]="";
    $copy_subject[1]="";
    $copy_intro[1]="";
    $copy_from[1]="";
    $copy_tomail_field[1]="";
    // Result options
    $header[1]="";
    $footer[1]="";
    $error_page[1]="";
    $thanks_page[1]="";
    // Default Error and Success Page Variables
    $error_page_title[1]="";
    $error_page_text[1]="";
    $thanks_page_title[1]="";
    $thanks_page_text[1]="";
    // Antispam Options
    $empty_field[1]="";
    $character_scan[1]="";
    $time_delay[1]="";
    $captcha_codes[1]="";
    $max_urls[1]="";
    $max_url_fields[1]="";
    $flag_spam[1]="";
    // Don't muck around past this line unless you know what you are doing //
    ob_start();
    $config=$_POST["config"];
    $debug=0;
    $debug_text="";
    // fix for Windows email server security
    ini_set("sendmail_from",$tomail[$config]);
    // email validation regular expression
    $regex = "^[-a-z0-9!#$%&\'*+/=?^_`{|}~]+(\.[-a-z0-9!#$%&\'*+/=?^_`{|}~]+)*@(([a-z0-9]([-a-z0-9]*[a -z0-9]+)?){1,63}\.)+([a-z]([-a-z0-9]*[a-z0-9]+)?){2,63}$";
    $header_injection_regex = "(\r|\n)";
    if($header[$config]!="")
    include($header[$config]);
    if($_POST["submit"] || $_POST["Submit"] || $_POST["submit_x"] || $_POST["Submit_x"])
    // begin global functions //
    // get visitor IP
    function getIP()
      if(getenv(HTTP_X_FORWARDED_FOR))
       $user_ip=getenv("HTTP_X_FORWARDED_FOR");
      else
       $user_ip=getenv("REMOTE_ADDR");
      return $user_ip;
    // get value of given key
    function parseArray($key)
      $array_value=$_POST[$key];
      $count=1;
      extract($array_value);
      foreach($array_value as $part_value)
       if($count > 1){$value.=", ";}
       $value.=$part_value;
       $count=$count+1;
      return $value;
    // stripslashes and autolink url's
    function parseValue($value)
      $value=preg_replace("/(http:\/\/+.[^\s]+)/i",'<a href="\\1">\\1</a>', $value);
      return $value;
    // html header if used
    function htmlHeader()
      $htmlHeader="<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\">\n<html>\n<head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=".$charset[$config]."\"></head>\n<body>\n<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" width=\"600\">\n";
      return $htmlHeader;
    // html footer if used
    function htmlFooter()
      $htmlFooter="</table>\n</body>\n</html>\n";
      return $htmlFooter;
    // build verticle table format
    function buildVertTable($fields, $intro, $to, $send_ip)
      $message=htmlHeader();
      if($intro != "")
       $message.="<tr>\n<td align=\"left\" valign=\"top\" colspan=\"2\">".$intro."</td>\n</tr>\n";
      $fields_check=preg_split('/,/',$fields);
      $run=sizeof($fields_check);
      for($i=0;$i<$run;$i++)
       $cur_key=$fields_check[$i];
       $cur_value=$_POST[$cur_key];
       if(is_array($cur_value))
        $cur_value=parseArray($cur_key);
       $cur_value=parseValue($cur_value);
       if($allow_html[$config]=="no")
        $cur_value=htmlspecialchars(nl2br($cur_value));
       else
        $cur_value=nl2br($cur_value);
       $message.="<tr>\n<td align=\"left\" valign=\"top\" style=\"white-space:nowrap;\"><b>".$cur_key."</b></td>\n<td align=\"left\" valign=\"top\" width=\"100%\">".$cur_value."</td>\n</tr>\n";
      if($send_ip=="yes" && $to=="recipient")
       $user_ip=getIP();
       $message.="<tr>\n<td align=\"left\" valign=\"top\" style=\"white-space:nowrap;\"><b>Sender IP</b></td>\n<td align=\"left\" valign=\"top\" width=\"100%\">".$user_ip."</td>\n</tr>\n";
      $message.=htmlFooter();
      return $message;
    // build horizontal table format
    function buildHorzTable($fields, $intro, $to, $send_ip)
      $message=htmlHeader();
      $fields_check=preg_split('/,/',$fields);
      $run=sizeof($fields_check);
      if($intro != "")
       $message.="<tr>\n<td align=\"left\" valign=\"top\" colspan=\"".$run."\">".$intro."</td>\n</tr>\n";
      $message.="<tr>\n";
      for($i=0;$i<$run;$i++)
       $cur_key=$fields_check[$i];
       $message.="<td align=\"left\" valign=\"top\" style=\"white-space:nowrap;\"><b>".$cur_key."</b></td>\n";
      if($send_ip=="yes" && $to=="recipient")
       $message.="<td align=\"left\" valign=\"top\" style=\"white-space:nowrap;\"><b>Sender IP</b></td>\n";
      $message.="</tr>\n";
      $message.="<tr>\n";
      for($i=0;$i<$run;$i++)
       $cur_key=$fields_check[$i];
       $cur_value=$_POST[$cur_key];
       if(is_array($cur_value))
        $cur_value=parseArray($cur_key);
       $cur_value=parseValue($cur_value);
       if($allow_html[$config]=="no")
        $cur_value=htmlspecialchars(nl2br($cur_value));
       else
        $cur_value=nl2br($cur_value);
       $message.="<td align=\"left\" valign=\"top\">".$cur_value."</td>\n";
      $message.="</tr>\n";
      $message.="<tr>\n";
      if($send_ip=="yes" && $to=="recipient")
       $user_ip=getIP();
       $message.="<td align=\"left\" valign=\"top\">".$user_ip."</td>\n";
      $message.="</tr>\n";
      $message.=htmlFooter();
      return $message;
    // build plain text format
    function buildTextTable($fields, $intro, $to, $send_ip)
      $message="";
      if($intro != "")
       $message.=$intro."\n\n";
      $fields_check=preg_split('/,/',$fields);
      $run=sizeof($fields_check);
      for($i=0;$i<$run;$i++)
       $cur_key=$fields_check[$i];
       $cur_value=$_POST[$cur_key];
       if(is_array($cur_value))
        $cur_value=parseArray($cur_key);
       $cur_value=parseValue($cur_value);
       if($allow_html[$config]=="no")
        $cur_value=htmlspecialchars($cur_value);
       else
        $cur_value=$cur_value;
       $message.="".$cur_key.": ".$cur_value."\n";
      if($send_ip=="yes" && $to=="recipient")
       $user_ip=getIP();
       $message.="Sender IP: ".$user_ip."\n";
      return $message;
    // get the proper build fonction
    function buildTable($format, $fields, $intro, $to, $send_ip)
      if($format=="vert_table")
       $message=buildVertTable($fields, $intro, $to, $send_ip);
      else if($format=="horz_table")
       $message=buildHorzTable($fields, $intro, $to, $send_ip);
      else
       $message=buildTextTable($fields, $intro, $to, $send_ip);
      return $message;
    // referrer checking security option
    function checkReferer()
      if($check_referrer=="yes")
       $ref_check=preg_split('/,/',$referring_domains);
       $ref_run=sizeof($ref_check);
       $referer=$_SERVER['HTTP_REFERER'];
       $domain_chk="no";
       for($i=0;$i<$ref_run;$i++)
        $cur_domain=$ref_check[$i];
        if(stristr($referer,$cur_domain)){$domain_chk="yes";}
      else
       $domain_chk="yes";
      return $domain_chk;
    // checking required fields and email fields
    function checkFields($text_fields, $email_fields, $regex)
           $error_message="";
      if($debug==1)
       $error_message.="<li>text_fields: ".$text_fields."<br />email_fields: ".$email_fields."<br />reply_to_field: ".$reply_to_field."<br />reply_to_name: ".reply_to_name."</li>";
      if($text_fields != "")
       $req_check=preg_split('/,/',$text_fields);
       $req_run=sizeof($req_check);
       for($i=0;$i<$req_run;$i++)
        $cur_field_name=$req_check[$i];
        $cur_field=$_POST[$cur_field_name];
        if($cur_field=="")
         $error_message.="<li>You are missing the <b>".$req_check[$i]."</b> field</li>\n";
      if($email_fields != "")
       $email_check=preg_split('/,/',$email_fields);
       $email_run=sizeof($email_check);
       for($i=0;$i<$email_run;$i++)
        $cur_email_name=$email_check[$i];
        $cur_email=$_POST[$cur_email_name];
        if($cur_email=="" || !eregi($regex, $cur_email))
         $error_message.="<li>You are missing the <b>".$email_check[$i]."</b> field or it is not a valid email address.</li>\n";
      return $error_message;
    // attachment function
    function getAttachments($attachment_fields, $message, $content_type, $border)
      $att_message="This is a multi-part message in MIME format.\r\n";
      $att_message.="--{$border}\r\n";
      $att_message.=$content_type."\r\n";
      $att_message.="Content-Transfer-Encoding: 7bit\r\n\r\n";
      $att_message.=$message."\r\n\r\n";
      $att_check=preg_split('/,/',$attachment_fields);
      $att_run=sizeof($att_check);
      for($i=0;$i<$att_run;$i++)
       $fileatt=$_FILES[$att_check[$i]]['tmp_name'];
       $fileatt_name=$_FILES[$att_check[$i]]['name'];
       $fileatt_type=$_FILES[$att_check[$i]]['type'];
       if (is_uploaded_file($fileatt))
        $file=fopen($fileatt,'rb');
        $data=fread($file,filesize($fileatt));
        fclose($file);
        $data=chunk_split(base64_encode($data));
        $att_message.="--{$border}\n";
        $att_message.="Content-Type: {$fileatt_type}; name=\"{$fileatt_name}\"\r\n";
        $att_message.="Content-Disposition: attachment; filename=\"{$fileatt_name}\"\r\n";
        $att_message.="Content-Transfer-Encoding: base64\r\n\r\n".$data."\r\n\r\n";
      $att_message.="--{$border}--\n";
      return $att_message;
    // function to set content type
    function contentType($charset, $format)
      if($format=="vert_table")
       $content_type="Content-type: text/html; charset=".$charset."\r\n";
      else if($format=="horz_table")
       $content_type="Content-type: text/html; charset=".$charset."\r\n";
      else
       $content_type="Content-type: text/plain; charset=".$charset."\r\n";
      return $content_type;
    // end global functions //
    // begin procedural scripting //
    // anti-spam empty field check
    if($_POST[$empty_field[$config]] != "")
      $empty_message = "<li>This submission failed and was flagged as spam.</li>\n";
    // anti-spam character scan check
    if(strlen($character_scan[$config]) > 0)
      $spam_message="";
      $field_check=preg_split('/,/',$character_scan[$config]);
      $field_run=sizeof($field_check);
      for($i=0;$i<$field_run;$i++)
       $cur_field_name=$field_check[$i];
       $cur_field=$_POST[$cur_field_name];
       if(preg_match("/<(.|\n)+?>/", $cur_field) || preg_match("/\[(.|\n)+?\]/", $cur_field))
        $spam_message.="<li>This message contains disallowed characters.</li>\n";
    // anti-spam time delay check
    if((strlen($time_delay[$config]) > 0 && strlen($_POST["time"]) > 0) || (strlen($time_delay[$config]) > 0 && (strlen($_POST["time"]) == 0 || !$_POST["time"])))
      if((time() - $_POST["time"]) < $time_delay[$config])
       $time_message = "<li>This has been stopped by the timer, and is likely spam.</li>\n";
    // anti-spam CAPTCHA check
    if(strlen($captcha_codes[$config]) > 0)
      $captcha_check=preg_split('/,/',$captcha_codes[$config]);
      if(strtolower($_POST["captcha_entry"]) != strtolower($captcha_check[$_POST["captcha_code"]]))
       $captcha_message = "<li>CAPTCHA test did not match.</li>\n";
    // anti-spam max URL check
    if(strlen($max_url_fields[$config]) > 0)
      $max_url_message="";
      $field_check=preg_split('/,/',$max_url_fields[$config]);
      $field_run=sizeof($field_check);
      for($i=0;$i<$field_run;$i++)
       $cur_field_name=$field_check[$i];
       $cur_field=$_POST[$cur_field_name];
       preg_match_all("/http:/", $cur_field, $matches);
       if(count($matches[0]) > $max_urls[$config])
        $max_url_message.="<li>This message contains too many URL's.</li>\n";
    // set anti-spam flagging option
    if(strlen($empty_message.$spam_message.$time_message.$captcha_message.$max_url_message) > 0 && strlen($flag_spam[$config]) == 0)
      $set_flag = 2;
    else if(strlen($empty_message.$spam_message.$time_message.$captcha_message.$max_url_message) > 0 && strlen($flag_spam[$config]) > 0)
      $set_flag = 1;
    else
      $set_flag = 0;
    // header injection check
        $security_filter="";
    if(strlen($_POST[$reply_to_field[$config]]) > 0)
      if(eregi($header_injection_regex,$_POST[$reply_to_field[$config]]))
       $security_filter.="<li>Header injection attempt detected, mail aborted.</li>\n";
      else
       $reply_to_field_checked=$_POST[$reply_to_field[$config]];
    if(strlen($_POST[$reply_to_name[$config]]) > 0)
      if(eregi($header_injection_regex,$_POST[$reply_to_name[$config]]))
       $security_filter.="<li>Header injection attempt detected, mail aborted.</li>\n";
      else
       $reply_to_name_checked=$_POST[$reply_to_name[$config]];
    // check domain referrer and continue
    $domain_chk=checkReferer();
    if($domain_chk=="yes")
      $error_message=checkFields($required_fields[$config], $required_email_fields[$config], $regex);
      if(strlen($error_message) < 1 && strlen($security_filter) < 1 && $set_flag < 2)
       // build appropriate message format for recipient
       $content_type=contentType($charset[$config], $mail_type[$config]);
       $message=buildTable($mail_type[$config], $mail_fields[$config], $mail_intro[$config], "recipient", $return_ip[$config]);
       // build header data for recipient message
       //$extra="From: ".$_POST[$reply_to_field[$config]]."\r\n";
       $extra="From: ".$reply_to_name_checked." <".$reply_to_field_checked.">\r\n";
       if($cc_tomail[$config]!="")
        $extra.="Cc: ".$cc_tomail[$config]."\r\n";
       if($bcc_tomail[$config]!="")
        $extra.="Bcc: ".$bcc_tomail[$config]."\r\n";
       if($mail_priority[$config]!="")
        $extra.="X-Priority: ".$mail_priority[$config]."\r\n";
       // get attachments if necessary
       if($attachment_fields[$config]!="")
        $semi_rand=md5(time());
        $border="==Multipart_Boundary_x{$semi_rand}x";
        $extra.="MIME-Version: 1.0\r\n";
        $extra.="Content-Type: multipart/mixed; boundary=\"{$border}\"";
        $message=getAttachments($attachment_fields[$config], $message, $content_type, $border);
       else
        $extra.="MIME-Version: 1.0\r\n".$content_type;
       // send recipient email
       if($debug==1)
        if($set_flag == 1)
         $debug_text.="<p><b>Mail would have sent flagged for spam if not in debug mode.</b></p>";
        else
         $debug_text.="<p><b>Mail would have sent if not in debug mode.</b></p>";
       else if($debug==0)
        if($set_flag == 1)
         $subject = $flag_spam[$config]." ".$subject[$config];
        else
         $subject = $subject[$config];
        mail("".$tomail[$config]."", "".stripslashes($subject)."", "".stripslashes($message)."", "".$extra."");
       // autoresponse email if necessary
       if($send_copy[$config]=="yes")
        // build appropriate message format for autoresponse
        $content_type=contentType($charset[$config], $copy_format[$config]);
        $message=buildTable($copy_format[$config], $copy_fields[$config], $copy_intro[$config], "autoresponder", $return_ip[$config]);
        // build header data for autoresponse
        $copy_tomail=$_POST[$copy_tomail_field[$config]];
        $copy_extra="From: ".$copy_from[$config]."\r\n";
        // get autoresponse  attachments if necessary
        if($copy_attachment_fields[$config]!="")
         $semi_rand=md5(time());
         $border="==Multipart_Boundary_x{$semi_rand}x";
         $copy_extra.="MIME-Version: 1.0\r\n";
         $copy_extra.="Content-Type: multipart/mixed; boundary=\"{$border}\"";
         $message=getAttachments($copy_attachment_fields[$config], $message, $content_type, $border);
        else
         $copy_extra.="MIME-Version: 1.0\r\n".$content_type;
        // send autoresponse email
        if($debug==1)
         if($set_flag == 1)
          $debug_text.="<p><b>Autoresponder would have sent flagged for spam if not in debug mode.</b></p>";
         else
          $debug_text.="<p><b>Autoresponder would have sent if not in debug mode.</b></p>";
        else if($debug==0)
         $send_copy = 1;
         if($copy_tomail=="" || !eregi($regex,$copy_tomail))
          $send_copy = 0;
         if($send_copy == 1)
          if($set_flag == 1)
           $copy_subject = $flag_spam[$config]." ".$copy_subject[$config];
          else
           $copy_subject = $copy_subject[$config];
          mail("$copy_tomail", "".$copy_subject."", "$message", "$copy_extra");
       // showing thanks pages from a successful submission
       if($thanks_page[$config]=="")
        echo "<h3>".$thanks_page_title[$config]."</h3>\n";
        echo "<p>".$thanks_page_text[$config]."</p>\n";
        if(strlen($debug_text) > 0)
         echo "<p><b><i>".$debug_text."</i></b></p>\n";
       else
        header("Location: ".$thanks_page[$config]);
      else
       // entering error page options from missing required fields
       if($error_page[$config]=="")
        echo "<h3>".$error_page_title[$config]."</h3>\n";
        echo "<ul>\n";
        echo $security_filter.$empty_message.$error_message.$spam_message.$time_message.$captcha_messa ge.$max_url_message;
        echo "</ul>\n";
        echo "<p>".$error_page_text[$config]."</p>\n";
       else
        header("Location: ".$error_page[$config]);
    else
      echo "<h3>".$error_page_title[$config]."</h3>\n";
      // message if unauthorized domain trigger from referer checking option
      echo "<p>Sorry, mailing request came from an unauthorized domain.</p>\n";
    // end procedural scripting //
    else
    echo "<h3>Error</h3>";
    echo "<p>No form data has been sent to the script</p>\n";
    if($footer[$config]!="")
    include($footer[$config]);
    ob_end_flush();
    ?>

  • I have a HP Laserjet P2055dn booklet printing is not working anymore. Windows 7 64 bit

    I used to do booklet printing on my HP P2055dn; a feature that I loved!   Suddently thisfeature stopped and therefore  I updated the driver  but  now it is gone for good. 
    Under printer properties I used to have "General Printing", "dublex",  "Envelops", " Booklet" and "Defaults".but  now there is only "General" and "Duplex" the rest is gone.!!!!!.
    I am using Windows 7, 64 bit, Word 2010. Neither printer driver P2055dnUPS PC6 nor HP univerals PCL 6 works.
    Please note that  I still have  all the printer properties (above) on my laptop, Win7, 64 bit Word 2007 (old printer driver).
    I assume this has something to do with the compatability of Office 2010 AND the  Printer driver. I could easily test this by updating the printer driver on my laptop but I am afraid to lose this feature there too.  Any useful advice!!!!
    Update: I installed the old printer driver and  have all printer properties!!  There is a problem with HP updated relased in July 2011 !!
    Update: although the software shows the booklet prining and envelop option. Booklet prining is not working. So my quess is that the HP frimware update screwed everything up!!!  So what do do now?

    Hi,
    Please update the printer driver with correct version and compatible with Windows version.
    Then Open "Devices and Printers" and right click on "Printing Prefences"
    Create new Printing Shotcuts as below.
    Then go to the other tab Finishing and do exactly like the image.
    Apply and Save.
    Your Booklet printing and shotcuts is ready. now you can print.
    Please let me know if this is being useful for you.

  • Anychart save as pdf/image not working

    A while ago I posed this question when the right click, save as stopped working on my APEX charts
    Apex charts - right click, save as image (not responding)
    The problem resolved when anychart.com was back up, but the problem is occurring again and I wonder if they've moved their php files.  Not even in Hilary's sample app is working. We think this happened within the last month.
    After choosing save as image and a location, the "saving" just keeps spinning.
    Most anychart google results at the moment seem to revert to the same landing page, and webcached copies refer to locations that no longer exist.
    I wonder with post anychart7 cleanup, have they moved the supporting php files? For instance, this location no longer exists
    http://www.anychart.com/products/anychart/saveas/pdf/PDFSaver.php
    A workaround is to use a local copy of the php file with custom XML
      <settings>
        <pdf_export file_name="mychart.pdf" use_title_as_file_name="true" url="/i/AnyChart4_SaveAsPDF_php4/PDFSaver.php" image_type="jpg" />
    But I only have the PDFSaver, not the AnyChartPNGSaver.php
    This file no longer exists either:
    http://anychart.com/products/anychart/docs/users-guide/export_image_scripts/php.zip
    Does anyone know where I can source the png saver php, or suggest another workaround? Or have any other information on this issue.
    An email to [email protected] back in 2013 got no reply.
    APEX 4.2.0
    Scott.

    Hi Scott,
    So, if i understand properly, making this change
    <settings><pdf_export file_name="mychart.pdf" use_title_as_file_name="true" url="/i/AnyChart4_SaveAsPDF_php4/PDFSaver.php" image_type="jpg" />
    will avoid atleast PDF issue? And as i dont have privileges to install or deinstall anything on /i/ folder, still this will work and URL path will remain same for each installation?
    Adding another question, as you said "it sends base64 information when converting to PDF", does it mean i will not be able to convert to PDF, if i am using intranet and PC's not accessible to internet?
    Thanks
    Sunil Bhatia

  • Splash image not working in JNLP

    Hi all...
    Splash image is not get displayed in my Application..
    Here is my JNLP file.
    <jnlp spec="6.0+" codebase="http://localhost:8080/MyProject/">
      <information>
        <title>MyProject1.0</title>
        <vendor>My Company.</vendor>
        <homepage href="null"/>
        <description>Application Launcher For MyProject1.0</description>
        <icon href="http://localhost:8080/MyProject/images/Splash_MyProject.jpg" height="300" width="560" kind="splash"/>
        <offline-allowed/>
      </information>
      <security>
        <all-permissions/>
      </security>
      <update check="timeout" policy="always"/>
      <resources>
        <java version="1.6"/>
        <jar href="http://localhost:8080/MyProject/SwingApplication/mysql-connector-java-5.0.6-bin.jar" download="eager" main="false"/>
        <jar href="http://localhost:8080/MyProject/SwingApplication/MyProject1.0.jar" download="eager" main="true"/>
        <jar href="http://localhost:8080/MyProject/SwingApplication/liquidlnf.jar" download="eager" main="false"/>
      </resources>
      <application-desc main-class="com.mycompany.ui.MainWindow">
        <argument>production%0%3#com.mysql.jdbc.Driver#MyProject4%jdbc:mysql://10.100.1.89:3306/MyProject4%MyProject%info123#MyProject2%jdbc:mysql://10.100.1.89:3306/MyProject2%MyProject%info123</argument>
      </application-desc>
    </jnlp>Splash image not get displayed and then I change *<java version="1.6"/>* to *<java java-vm-args="-splash:resource/images/Splash_MyProject.jpg" version="1.6"/>*
    still splash image not get shown on application startup..
    no java.awt.SplashScreen() class instance found.
    Plz anybody give some idea...

    I have also a problem with the splash screen not displaying. This is the first relevant portion of the jnlp:
    <jnlp spec="1.5+" codebase="http://www.i-modulas.nl/downloads/"
    href="imodulas.jnlp">
    <information>
    <title>i-Modulas Thin Client</title>
    <vendor>i-Modulas Software BV</vendor>
    <icon kind="splash" href="http://www.i-modulas.nl/downloads/javathinsplash.jpg"/>
    </information>
    <security>
    <all-permissions/>
    </security>
    <resources>
    <j2se version="1.5+"/>
    <jar href="isrun.jar"/>
    <property name="iscobol.conf" value="http://www.i-modulas.nl/downloads/javaclientproperties.txt"/>
    </resources>
    <resources os="Windows">
    <property name="swing.defaultlaf" value="com.sun.java.swing.plaf.windows.WindowsLookAndFeel" />
    </resources>
    <resources os="Linux">
    <property name="swing.defaultlaf" value="com.sun.java.swing.plaf.gtk.GTKLookAndFeel" />
    </resources>
    The application starts normal and uses a different look and feel under Windows as under Linux, but I do not see the splash screen. I tried different ways of referencing to the picture and I also tried using a .gif format. It never worked!
    Any suggestions are welcome!
    Ren�

Maybe you are looking for