Printing image problem.

Hi to all.
I am new in abap programming.
I would like to ask what could be the reason in my program for not printing the image. I do not know where's my mistake is, please help. Thanks..
I got this program from internet and it's pretty displaying the image ( I uploaded the image in SE78), then I created the program below and run it, but when I happened to click the print button, it wasn't giving me anything or no action at all.
REPORT  ZPICTURE04.
START-OF-SELECTION.
  SET PF-STATUS 'ADJTEMP'.
CALL SCREEN 9000.
module status_9000 output.
  SET PF-STATUS 'ADJTEMP'.
  data: w_lines type i.
  types pict_line(256) type c.
  data : ok_code type c,
        exit type c.
  data :
  container type ref to cl_gui_custom_container,
  editor type ref to cl_gui_textedit,
  picture type ref to cl_gui_picture,
  pict_tab type table of pict_line,
  url(255) type c.
  data: graphic_url(255).  data: begin of graphic_table occurs 0,
          line(255) type x,
        end of graphic_table.
  data: l_graphic_conv type i.
  data: l_graphic_offs type i.
  data: graphic_size type i.
  data: l_graphic_xstr type xstring.
  call method cl_gui_cfw=>flush.  create object:
  container exporting container_name = 'PICTURE_CONTAINER',
  picture exporting parent = container.
  call method cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp
exporting
p_object       = 'GRAPHICS'
p_name        = 'XLPE'
p_id           = 'BMAP'
p_btype        = 'BCOL'
receiving
p_bmp          = l_graphic_xstr
  graphic_size = xstrlen( l_graphic_xstr ).
  l_graphic_conv = graphic_size.
  l_graphic_offs = 0.
  while l_graphic_conv > 255.
    graphic_table-line = l_graphic_xstr+l_graphic_offs(255).
    append graphic_table.
    l_graphic_offs = l_graphic_offs + 255.
    l_graphic_conv = l_graphic_conv - 255.
  endwhile.
  graphic_table-line = l_graphic_xstr+l_graphic_offs(l_graphic_conv).
  append graphic_table.
  call function 'DP_CREATE_URL'
    exporting
      type     = 'IMAGE'
      subtype  = 'X-UNKNOWN'
      size     = graphic_size
      lifetime = 'T'
    tables
      data     = graphic_table
    changing
      url      = url.
  call method picture->load_picture_from_url
    exporting
      url = url.
  call method picture->set_display_mode
    exporting
      display_mode = picture->display_mode_fit_center.
  case sy-ucomm.
    when 'EXIT'.
      leave program.
    WHEN '%PRI'.
      NEW-PAGE PRINT ON
      DESTINATION 'LP01'
      IMMEDIATELY 'X'
      KEEP IN SPOOL 'X'
      NO DIALOG.
      NEW-PAGE PRINT OFF.
         endcase.
endmodule.                 " STATUS_9000  OUTPUT
my pf-status "  SET PF-STATUS 'ADJTEMP", I set it from the / menu / extras / adjust template then List status.
Is there anything I missed for not printing it? Thanks a lot to all.
Edited by: chard_vill on Nov 27, 2011 8:59 AM

Hi Venkat, Thanks a lot for the very helpful reply.
I can't seem follow the contents in the link and lost it somewhere, may be I am missing something being a beginner?
I actually have that program for displaying the image, uploaded from the transaction SMW0 (Binary data for WebRFC applications.). I successfully uploaded the images (format .gif and jpeg), and it was also successful displaying on the screen container.
The problem now is also similar, print button seems not functioning, I guess I am missing something I don't know.
Your help is really appreciated, thanks a lot!
here is my executable program.
REPORT  ZPICTURE02.
TYPE-POOLS: cndp.
DATA: ok_code TYPE syucomm,
      container TYPE REF TO cl_gui_custom_container,
      picture TYPE REF TO cl_gui_picture,
      url TYPE cndp_url,
      print_parameters TYPE pri_params,
      valid_flag       TYPE c LENGTH 1..
User can input which object name they uploaded from SMW0.
PARAMETERS: p_objid TYPE w3objid OBLIGATORY.
Here query the table and throw error message if the object is not found.
AT SELECTION-SCREEN.
  SELECT COUNT(*) FROM wwwparams
    WHERE objid = p_objid.
    IF sy-subrc <> 0.
      MESSAGE e001(00) WITH 'MIME Object not found'.
    ENDIF.
START-OF-SELECTION.
Enabled the function keys from template
SET PF-STATUS 'S0100'.
    IF container is INITIAL.
      CREATE OBJECT container
      EXPORTING
        container_name  = 'CONT'
        repid           = 'ZPICTURE02'
        dynnr           = '0100'
      EXCEPTIONS
        cntl_error = 1
        cntl_system_error = 2
        create_error = 3
        lifetime_error = 4
        lifetime_dynpro_dynpro_link = 5
        OTHERS = 6.
      IF sy-subrc <> 0.
        MESSAGE i001(00) WITH 'Error while creating container'.
        LEAVE LIST-PROCESSING.
      ENDIF.
    ENDIF.
    IF picture is INITIAL.
      CREATE OBJECT picture
        EXPORTING
          parent = container
        EXCEPTIONS
          error = 1
          OTHERS = 2.
        IF sy-subrc <> 0.
          MESSAGE i001(00) WITH 'Error while displaying pictures'.
          LEAVE LIST-PROCESSING.
        ENDIF.
     ENDIF.
     IF picture IS NOT INITIAL.
       CALL FUNCTION 'DP_PUBLISH_WWW_URL'
       EXPORTING
         objid = p_objid
         lifetime = cndp_lifetime_transaction
         IMPORTING
           url = url
           EXCEPTIONS
             OTHERS = 1.
       IF sy-subrc = 0.
         CALL METHOD picture->load_picture_from_url_async
         EXPORTING
           url = url.
         CALL METHOD picture->set_display_mode
         EXPORTING
           display_mode = cl_gui_picture=>display_mode_fit.
       ELSE.
         MESSAGE i001(00) WITH 'Error while loading picture222'.
         LEAVE LIST-PROCESSING.
       ENDIF.
     ENDIF.
call SCREEN 0100.
MODULE status_0100 OUTPUT.
  SET PF-STATUS 'S0100'.
SET TITLEBAR 'XXX'.
ENDMODULE.
MODULE user_command_0100 INPUT.
  CASE ok_code.
    WHEN 'BACK'.
      SET SCREEN 00.
      LEAVE SCREEN.
    when 'EXIT'.
      LEAVE PROGRAM.
    WHEN 'PRINT'.
      NEW-PAGE PRINT ON
      DESTINATION 'LP01'
      IMMEDIATELY 'X'
      KEEP IN SPOOL 'X'
      NO DIALOG.
      NEW-PAGE PRINT OFF.
WHEN 'PRNLOG'.
  CALL FUNCTION 'GET_PRINT_PARAMETERS'
    IMPORTING
      out_parameters       = print_parameters
      valid                = valid_flag
    EXCEPTIONS
      invalid_print_params = 2
      OTHERS               = 4.
  NEW-PAGE PRINT ON PARAMETERS print_parameters
                    NO DIALOG.
  NEW-PAGE PRINT OFF.
  ENDCASE.
ENDMODULE.
In my own opinion, the function code "%PRN" and "PRINT" seems not functioning, is there anything I missed?
Thanks a lot.

Similar Messages

  • FlashPaper printing images problem

    Hi
    I have converted a PDF to FlashPaper. When I view the file on
    the screen, it seems to be a perfect replication of the original
    PDF. The problem occurs when I print the flashPaper. The images on
    the page are not the same as on the screen. It seems as though
    there is a masking problem when printing. I.e. It looks as though
    the original images where layered with masks and this is causing
    the problem. I don't have access to the original images or the
    original source document to edit it.
    Has anybody else experienced the same problems?
    If so, how can I tackle it?
    Thank you in advance.

    quote:
    we're trying to post flashpaper documents on our website for
    students and teachers to download or print. It seems that every
    different configuration of computer and printer gets a different
    result in how the document prints.
    Sorry, but why don't you try to direct the users to use the
    flash paper's print button ? That's why it is there. I use flash
    paper and i direct people to use it. Showing an image on the site:
    A very big red circle around the print button and a big - bold
    arrow pointing it ... lol

  • Safari 5 don't print jpg images in Windows and prints with problems in Mac

    Hi All,
    When I try to print images in Safari (Windows) it will print blank page.
    This is sample source:
    <html lang="en-US">
    <body>
    <im g src="http://img185.imageshack.us/img185/4651/wefwefwe.jpg">
    </body>
    </html>
    This is ok in Mac.
    Also in Mac When I'm printing image in Landscape it print image in 2 pages.
    Image really fits in landscape mode and there is no need for second page.
    I thought that the problem is margins..., but changing them do smaller values doesn't help.
    Can someone help out?

    Hi, I also have the same problem that cannot print preview on .jpg image.
    When I try to change image to .png , it work.
    It's this safari5 bug?

  • Photosmart D110 All-In-One Printer - Shadow image problem

    I have been having a problem with this printer, ever since we purchased it about 2 months ago, where it will print a shadow image of text or pictures on some documets but not others. It is specific and consistent in that it will print this shadow image on some documents every time and on other documents none of the time. I have a PC and a Mac and it doesn't matter which computer I use, only which document. Sometimes it is only a part of a document, like the computer generated part of an email where it says " this person at this time on this date wrote.." but the other text will be fine. It happens on some coloring pages but not others. I spent  2 hours on the support line yesterday; it's still doing it. She had me unplug it, take off the printer software and reinstall it, update software (on my Mac)  and it did not fix it.  Any ideas on what may be causing this & how to fix it? I like the printer but am about to return it because of this problem.  The printer we had been using was an HP C4280 and did not have this problem. I'd like to keep the printer if I can fix this problem.

    I'm having the same shadow imaging problem on my Deskjet F4580, so if anyone knows how to correct it please post.. I've reinstalled/updated the driver, disabled advanced features, and deslected "Enable HP Real Life Technoliges".

  • I have a color management problem.  I have OS X v 10.5, Adobe Photoshop Elements 6, and an Epson Stylus Photo R800.  I want to print images I have scanned on a Epson Perfection 1660 Photo and corrected in Photoshop and get the colors accurate.

    i have a color management problem.  I have OS X v 10.5, Adobe Photoshop Elements 6, and an Epson Stylus Photo R800.  I want to print images I have scanned on a Epson Perfection 1660 Photo and corrected in Photoshop and get the colors accurate.

    I used the ColorSync utility to verify, and it came back with this report:
    /Library/Printers/EPSON/InkjetPrinter/PrintingModule/SPR800_Core.plugin/Contents /Resources/ICCProfiles/SPR800 Standard.icc
       Tag 'dmnd': Tag size is not correct.
    /Library/Application Support/Adobe/Color/Profiles/Recommended/CoatedFOGRA27.icc
       Tag 'desc': Tag size is not correct.
    /Library/Printers/EPSON/InkjetPrinter/ICCProfiles/Standard.profiles/Contents/Res ources/Epson IJ Printer.icc
       Tag 'dmnd': Tag size is not correct.
    /Library/Printers/EPSON/InkjetPrinter/PrintingModule/SPR800_Core.plugin/Contents /Resources/
    I did not know what to do next.  At the bottom of the window it said to go to www.apple.com/colorsync to find a tutorial.  I got a message saying that link does not work.  Tried to find the tutorial by searching at apple.com, but could not seem to locate it.  Does anyone know what the report above means and what I should do about it?  
    Also, how to find that tutorial?
    Re Using RGB all the way through, When I print from Photoshop Elements, I select Adobe RGB, Photoshop Manages under "Color Handling", Relative Colometric  under "Intent" and "ColorSync" i the Epson printer box.  Do you mean to do something different in this sequence?

  • Print Images' Contact Sheet problems from specific camera...

    I have printed a couple contact sheets (Print Images > Contact Sheet), and all the thumbnails for RAW files from a Panasonic DMC-LX2 all come out squooshed into a square, no matter what the actual orientation of the file is. I have forced an update of the previews and there is no change. Is this a common problem for others? In the preview for printing single images to a page, the images appear normal, but with contact sheets the images from this camera come out square. No problems with my Canon files or other JPGs.
    I suspect there is no work-around, but ask just in case. It would be nice if there is, as the contact sheets are for a copyright registration, and the square makes the image possibly illegible in the eyes of a future court, if it ever got to that.

    HAs this already been discussed and fixed? hopefully?
    It appears to be a bug.
    http://discussions.apple.com/message.jspa?messageID=3553568&tstart=0

  • For those of you having problems printing images/pdf

    I spent awhile figuring this out as my Samsung ML-1630 printed text from TextEdit fine via Time Capsule USB, but I kept getting either errors or nothing at all when I attempted to print a PDF, web page, or image. Here is how I got it to work (I have only tested it on a Samsung ML-160 printer, but it should work for others having similar problems)
    1. Open "Print & Fax" in System Prefs
    2. Add a new printer.
    3. (important!) Choose IP at the top.
    4. For "Protocol" choose "HP Jetdirect - Socket"
    5. For "Address" use the local IP address of your Time Capsule - you can find this by opening the AirPort Utility -- mine was 10.0.1.1 by default.
    6. For "Print Using" select your printer driver
    7. Click "Add" and you should be able to print anything now
    This workaround is probably due to a driver issue, but I am not for certain.

    Thanks,
    This worked for printing images, but it is PAINFULLY slow. took 3 minutes or more to print a simple graphic file
    Message was edited by: AceMT

  • Problem Printing Images Using JAI

    I'm using JAI in an application that prints images. My program works fine on my development machine (Windows XP), but when I put it on my Windows Server 2008 r2-64 bit, it crashes for certain images (these are large images of land plats) that go to a particular printer (OCE PlotWave 300) It prints my smaller images that are printing on a variety of printers just fine (images of Mortgages etc..) and it prints everything just fine on my development machine. What could possibly be causing this?
    Edited by: LongStranjeTrip on Feb 2, 2011 4:34 PM
    Edited by: LongStranjeTrip on Feb 4, 2011 8:11 AM

    I'm using JAI in an application that prints images. My program works fine on my development machine (Windows XP), but when I put it on my Windows Server 2008 r2-64 bit, it crashes for certain images (these are large images of land plats) that go to a particular printer (OCE PlotWave 300) It prints my smaller images that are printing on a variety of printers just fine (images of Mortgages etc..) and it prints everything just fine on my development machine. What could possibly be causing this?
    Edited by: LongStranjeTrip on Feb 2, 2011 4:34 PM
    Edited by: LongStranjeTrip on Feb 4, 2011 8:11 AM

  • Print Images in 10.5.3

    Automator steps:
    1 - Run Applescript
    tell application "FileMaker Pro Advanced"
    set img_URL to cell "zz_web_ImgPath_CertImg_lct" of current record
    do shell script "cd /Applications/Cert_Print; curl -m 1 -fO " & img_URL
    set PID to cell "zzlocal_certpath" of current record
    end tell
    Step 2 - Get specified Finder Items
    Step 3 - Print Images
    Step 4 - Move specified Finder items to Trash.
    This workflow runs great on 10.5.2 but on all the machines upgraded to 10.5.3 it fails on the Print Images script. Providing no description as to why.
    Any ideas of how to do this another way which might bypass the bug?
    The point is that an image is downloaded to a local folder from our webserver then printed to fit the page.
    Thanks,
    Drew

    You made need to check your printer drivers. Sometimes GIMP drivers can cause more problems than needed

  • Windows 7 - HP Laserjet 8500 print driver problem

    I have tried everything imaginable to correct this HP 8500n print driver problem with no success, please help!
    I cannot correct or get rid of a reoccurring “Incompatible Print Settings” error dialog box message that repeatedly states that “There are one or more conflicting settings. One of the settings is: Output Bin: Mailbox 1, Accessory Output Bin: Not Installed”. The radio button options are “Restore my previous settings or Keep this setting, and I will change it later”. This same dialog message repeats 13 times for all the other various conflicts each time you click on printer properties to change to 2 sided printing or any other printer settings. This printer does not have any of these features attached or set into it.
    I am a volunteer that manages a number of computers on our small church LAN, 2 computers operating on MS XP-SP3, 2 on MS Windows 7 Home Premium and my 2 problem computers that came pre-installed with Vista Home Premium of which I have performed an HP OEM upgrade to Window 7.
    I have isolated this print driver problem to the Vista operating system and even when computers are upgraded to Windows 7 does not correct this driver error. I have also tried every possible print driver variant of the HP 8500, HP8550, PCL, PS to include the Microsoft versus HP versions with no success. In each case I get this error yet neither of the XP computers or the computers that had Windows 7 as a original operating system have no problems with their print drivers for this printer.
    Yes, I have repeatedly searched and upgraded the operating system and print drivers. In desperation I have even tried to find the correctly behaving Windows 7 print driver and transfer it to these Vista upgraded to Windows 7 machines. However I could not isolate the driver location.
    The only thing I can conclude is that this errant HP print driver was resident within Vista and remains resident even after a HP OEM Windows 7 upgrade. Additionally, all of these computers are configured to access this printer via its static IP address on the network.  The XP computers are 32 bit, all of the Vista upgraded to Win 7 and OEM Win 7 computers are 64 bit machines all with respective OS. 
    Can anyone please help me correct this problem?

    Hi, 
    Unfortunately I can't see your uploaded image yet as it is awaiting approval from HP.
    From what I can see you are correct that HP does supply drivers for this printer and that the drivers for your printer are already included with Windows 7.  On the machines affected, try the procedure below to see if it helps at all
    Next download revo uninstaller on the link below and install it.
    http://www.revouninstaller.com/download-freeware-version.php
    Disconnect the printer from the PC.
    Run Revo and see if it finds any  HP Printer Software installed.  If it does, right click the software icon and select uninstall.  During the process you may be asked to delete registry entries.  If you are, just select all and click delete.  Do the same for any left over files and folders.  Once completed, reboot the PC.
    Re-connect your printer to the PC and follow the guide below.
    http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?&objectID=c02536257
    If this helps you will need to repeat the process on each of the affected machines.
    Best wishes,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • How to get Safari printing images in proper resolution?

    I have problems printing high resolution images from a web page.
    Example: When printing a 300 dpi image that measures 5 x 6 inches Safari rescales this image to a resolution of about 282 dpi which results in a slightly larger image. The web page contains CSS definitions with the correct image size. It is suspicious that the printed images always seem to be rescaled by 6.348%. I tried different CSS definitions and page structures with the same result.
    When the CSS definition for the image size is increased by 6.348% the resolution and image size fits the original values and dimensions.
    What about this magical 6.348%?
    The problem is verified on 10.4.11 and 10.5 with Safari 3.0.1 on different machines with all kind of images in every resolution you can think of, with different printer drivers (but I do not think this is relevant) - all images are rescaled by this magic factor. I tried all kind of printer settings, took a look at the Library plists related to printing ... Please help me.
    It is weird that Safari offers ICC support for color proof matches but is not able to print an image with its correct resolution/dimensions. Firefox for example does not touch the image resolution, why the heck Safari does?

    Hi Ned,
    Website builders are using maximum 75 DPI images. These are to small i quality for other use when you are looking for quality images. The reason for using images in small size like 75 DPI is to prevent that the website is getting to big in size, an for using them on the internet they are good enough for best viewing.
    QuickTimeKirk is right to get better images from a website. If the developer is NOT offering a downloadble better quality you have to do it with the on they offer.
    Dimaxum

  • Print image shifted?

    I own an HP Photosmart A524 photo printer. Before you tell me that HP has no info on this printer on their website, let me explain that I bought it as a kit (called HP Photosmart Compact Photo Studio) with a camera (HP Photosmart M447) from WalMart. HP has no info on this printer on their website that I could find, but there are similar models like the A525.
    The problem I am having is that when I print via USB, the image is shifted. Printing via uploading a pic to the SD card and using the onboard card reader prints perfectly fine, but uploading the image, putting the card in the printer, and finding each image (which is buried deep among other pictures from my camera) is a hassle. When I print from the picture, instead of printing correctly the image is shifted to the left ~1cm and down ~1cm (diagonally, sometimes it's the opposite if I print from Picasa instead of Windows Photo Viewer) and never correctly; a "half" margin is always present, half because it is always on 2 sides. I downloaded the Windows 7 fix on HP's website for the A525, which didn't correct the problem, and I also tried installing the full installation avalible for Vista for that printer. The full installation was incompatible, and when I ran it compatible with Vista SP1 and with elevated admin rights, it said I needed to run as admin, even though I already was.
    Does anyone have any ideas? I really want to get this fixed, especially since I have this printer networked and want to be able to print photos from another computer without walking upstairs, getting the SD card, transfering photos, etc. The SD card method works, but. . . you know, it shouldn't be doing this.
    Thanks,
    Ryan

    @Marshall-
    I tried your solution by switching from the Photo Printing-Borderless setting to Photo Printing-with white borders. A suprising changed occured; though the image was  a very little bit distorted, sort of rotated, the print image was not shifted. This boosted my previous theory that distortion happened after the image was sent to que and before the printer recieved it, indicating a driver issue. That's where I think the issue is.
    Thanks,
    Ryan

  • MAC OS 10.5.7 and Samsung CLP-610ND color laser printer, images very dark

    Just picked up this printer 3 days ago, set up fine prints word files fine. Any images print very dark. MY main use is printing a pdf newsletter but the print image is so dark it is useless. I have tried print as image. I have also tried a plain jpg from camera and that was also very dark. Talked to Samsung and they said it was my computer and I should return it. Not what I want to do.
    Also I took my pdf file and tried ot on other laser printers that had a Secure digital file reader and the colors were correct some with my HO color inkjet.
    So printing through adobe or preview images are too dark.
    Any thoughts?
    Thanks in advance.
    Message was edited by: blu62vette

    Went back to HP.com and this time was able to see and download latest driver and firmware for HP LaserJet P3005dn  Installation of new firmware was done thru the HP Printer Utility application on my iMac OS 10.7.5
    I was able to choose my printer and then upload the firmware file from the iMac to the printer. This has completely solved the problem!
    Thank you ~graffiti Not sure why I was not able to access the driver and firmware earlier from the HP site but eventually I found it.

  • Persistent Image problem

    Okay, I just had the screen on this iMac replaced because of this problem with a dark line at the top of the screen. The screen has been replaced, and the dark line isn't there anymore. However, I am now having persistent image problems. This is noticeable when I use the Aurora desktop. If I have a window open (e.g. Safari) for a long enough time, and then I X out of it, I will see a shadow/ghost of it. It's most noticeable with a dark background. However, I DID change some of the settings in "Appearance," so I wonder if that might have done it. But I can't see a way to change everything back to default. Do you know if there's a way?

    Hi again - a couple of ideas:
    If you haven't printed the images or a while, it could be that you prepared them under a previous version of the Aperture raw and they've since been reprocessed, resulting in a slightly different look
    I had an occasion about 12 months ago when an update to the Epson printer drivers caused me to have to go back and change my print setups in Aperture, due to new colour interpretations.  Don't know why, but it happened... maybe your settings have changed since last printing?
    Could be that you did or didn't have the appropriate soft-proofing turned on - are you using this feature?

  • Print Images using FOP

    Can we print images using FOP by taking it from the database ? Iam using the FOP and outputing to a PDF. However, I have an image that I would like to print. The image is stored in the database as a BLOB. How can I print this image in the PDF document ?
    (b) Alternatively, if this is not possible, do we need to move the image to a physical file system and use <img src> and print ? If so, how can we move the image to the file system ? I found only UTL_FILE can do this ? But Iam not sure if it can work properly for Image file. When I tested this using utl_file, my image file got corrupted.

    Hi there, from what type of device are you trying to print the images from e.g. a smartphone/tablet or a PC/laptop?
    Best
    If my reply helped you, feel free to click on the Kudos button (hover over the "thumbs up").
    If my reply solved your problem please click on the Accepted Solution button so other Forum users may benefit from viewing the post.
    I am an HP employee.

Maybe you are looking for