How to print JPG image retrieved from BLOB in a table using Forms10g

I create a database schema and a Form to maintain JPG to the table PHOTOS.
I would like to add a button to PRINT just the PHOTO_IMAGE to its maximum size from a Form. How can I do that? Is thaere any built-in Forms functions to do that? If the client is using Windows XP, can I use CLIENT_HOST() to call a program to print the JPG file directly?
Any suggestion is welcome.
-- myphotos.sql
drop user myphoto cascade;
create user myphoto identified by myphoto;
grant connect, resource, ctxapp to myphoto;
connect myphoto/myphoto@orcl;
PROMPT Creating Table USERS
CREATE TABLE USERS
(USER_ID VARCHAR2(8) NOT NULL,
USER_LASTNAME VARCHAR2(15) NOT NULL,
USER_FIRSTNAME VARCHAR2(30) NOT NULL,
USER_PASSWORD VARCHAR2(20) NOT NULL,
CONSTRAINT PK_USERS PRIMARY KEY (USER_ID)
PROMPT Creating Table PHOTOS
CREATE TABLE PHOTOS
(PHOTO_ID VARCHAR2(15) NOT NULL,
PHOTO_IMAGE BLOB,
TEXT_DESCRIPTION CLOB,
FILENAME VARCHAR2(50),
FILE_SIZE NUMBER NOT NULL,
USER_ID VARCHAR2(8) NOT NULL,
ACCESS_RIGHT VARCHAR2(7) NOT NULL,
CONSTRAINT CK_ACCESS_RIGHT CHECK (ACCESS_RIGHT IN ('PRIVATE', 'PUBLIC')),
CONSTRAINT PK_PHOTOS PRIMARY KEY (PHOTO_ID),
CONSTRAINT FK_USER_ID FOREIGN KEY (USER_ID) REFERENCES USERS (USER_ID)
create index idx_photos_text_desc on
PHOTOS(TEXT_DESCRIPTION) indextype is ctxsys.context;
INSERT INTO USERS VALUES ('G345566A','WONG', 'TAI SIN','WONGTAISIN');
INSERT INTO PHOTOS VALUES
('P00000000000001', empty_blob(), empty_clob(),
'SCGP1.JPG',100,'G345566A','PUBLIC');
INSERT INTO PHOTOS VALUES
('P00000000000002', empty_blob(), 'Cold Play with me at the concert in Melbourne 2005',
'COLDPLAY1.JPG',200,'G345566A','PUBLIC');
INSERT INTO PHOTOS VALUES
('P00000000000003', empty_blob(), 'My parents in Melbourne 2001',
'COLDPLAY1.JPG',200,'G345566A','PRIVATE');
COMMIT;
EXEC CTX_DDL.SYNC_INDEX('idx_photos_text_desc');
SELECT USER_ID,PHOTO_ID ,TEXT_DESCRIPTION
FROM PHOTOS
ORDER BY USER_ID;
SELECT score(1),PHOTO_ID ,TEXT_DESCRIPTION
FROM PHOTOS
WHERE CONTAINS(TEXT_DESCRIPTION,'parents',1)> 0
ORDER BY USER_ID,score(1) DESC;
SELECT USER_ID,score(1),PHOTO_ID ,TEXT_DESCRIPTION
FROM PHOTOS
WHERE CONTAINS(TEXT_DESCRIPTION,'cold play',1)> 0
ORDER BY USER_ID,score(1) DESC;
SELECT USER_ID,score(1),score(2), PHOTO_ID ,TEXT_DESCRIPTION
FROM photos
WHERE ACCESS_RIGHT='PUBLIC'
AND CONTAINS(TEXT_DESCRIPTION,'Melbourne',1)> 0
AND CONTAINS(TEXT_DESCRIPTION,'2005',2)> 0
ORDER BY USER_ID,score(1) DESC;

I use a third part product to do this (irfanview.exe).
This tool allows to do some batch operation /print to print the file)
Francois

Similar Messages

  • How to print a specific page from a given PDF document, using command line, please?

    Hello,
    I need your advise, please. My customer requires to print a specfic page from a pdf document they receive, using command line or 3rd party solution.
    Anything you can advise, please? I have seen AcroRD32.exe options, but can only print the whole document.
    Kind Regards

    Not sure if there are any examples. The Acrobat SDK is a must, but it is best treated as documentation to study rather than examples to copy. The examples only illustrate a tiny fraction of the capabiliies.
    (One other note: the solution must involve the client owning Acrobat; Acrobat is not for server use).

  • Where are APEX images retrieved from in an n-tiered environmen?

    Oracle XE DB 11gR2
    Oracle APEX 4.1.1
    Glassfish 3.1.2
    Red Hat Linux 5.8
    ===========
    I notice when using Glassfish as part of my APEX environment I am required to copy the images to an /i directory on the Glassfish server under the Glassfish domain.
    The question arises --> When APEX needs to render an image, is the image retrieved from the database/database server or from the Glassfish web server?
    Thank you.

    >
    Please update your forum profile with a real handle instead of "user601798".
    Oracle XE DB 11gR2
    Oracle APEX 4.1.1
    Glassfish 3.1.2
    Red Hat Linux 5.8
    ===========
    I notice when using Glassfish as part of my APEX environment I am required to copy the images to an /i directory on the Glassfish server under the Glassfish domain.
    The question arises --> When APEX needs to render an image, is the image retrieved from the database/database server or from the Glassfish web server?The answer (as usual) is "It depends".
    If you're using Glassfish and the APEX Listener (or OHS) then images referenced using <tt>/i/</tt> / <tt>#IMAGE_PREFIX#</tt> are stored on and retrieved from the web server file system. If using EPG then they're stored on and retrieved from the database using the XMLDB repository.
    If the image is referenced using <tt>#WORKSPACE_IMAGES#</tt>, <tt>#APP_IMAGES#</tt>, or declarative BLOBs then they're stored on and retrieved from the database.

  • Tell me how to format a date retrieved from a MS SQL Server 2000 database?

    Tell me how to format a date retrieved from an MS SQL Server 2000 database for various uses in my JSP page?

    Or if you want to use JSTL instead of a scriptlet see:
    http://forum.java.sun.com/thread.jspa?threadID=676754&tstart=0

  • How to print the image data stored in object of 'java.io.File' Class in jsp

    I have created a file object for the image file in the system temporary directory.Now I want to display it in my page. please tell,How to print the image data stored in object(in my program it is imgr) of 'java.io.File' Class in jsp

    Create a servlet which gets an InputStream of the file and writes it to the OutputStream of the response and call this servlet in `src` attribute. That's basically all.
    Here's an example which covers the most of the minimum needs: [http://balusc.blogspot.com/2007/04/imageservlet.html].

  • I am getting errors upon use of JPG images, saved from Photoshop, in Encore.

    How do I use Photoshop JPG images in Encore without errors?
    When using camera jpg images, saved by Photoshop (either save, or image manipulation like autocolor then save, no other Photoshop options were tested), Encore will either :
    1) generate an image import error: "The software that's used to decode the media is not available on this system.  Installing the correct decoders for the files you are working with may help to correct the problem." and be unable to import the image,
    2) Image import stops before completion (Encore stops responding and must be Closed by Windows Task Manager), or
    3) with a number of images imported, upon attempts to create a Slideshow, Slideshow creation will stop while in progress, and Encore does not respond (Encore must be Closed by Windows Task Manager).
    Import and Slideshow creation using untouched camera images is nominal and uneventful.
    Import and Slideshow creation using PhotoShop(64bit) GIF (copy) images is nominal and uneventful.

    The common cause of this issue is still image files where the pixel size is too large. This warranted its own help page, which is now a dead link.
    http://helpx.adobe.com/encore/kb/error-software-used-decode-media.html
    But I assume the pixel size is the same whether you are processing them in Photoshop or not. but the main point is that the underlying problem is not about decoders. Encore encounters a problems dealing with the file and throws the only error it (apparently) has. So you are looking for anything like that: pixel size, changes between rgb and cmyk, extra metadata in files. Maybe even filename oddities (length, special characters).
    I would look in part at what versions you are using and compatibility settings.
    I would save them as png or psd.

  • How to print out multilingual reports from the main report using Xliff temp

    Hi all,
    How to print out multilingual reports from the main report using Xliff temp?
    When I want main report call subtemplate and finish xliff tranlation
    <?for-each@section:INVOICE?><?end for-each?>
    <?import:xdo://XXIH.XXNR_XXINVPRINT_SUB.en.FI/?>
    <?start:body?><?call:Header?><?call:Line?><?call:Weights?><?call:Banks?><?end body?><?call:Footer?>
    Prints out fine with Finnish translation
    But if I want in main program to check what language is used e.g.
    if trx_number = 142 call Finnish translation and if trx_number =144,
    call English translation.
    <?for-each@section:INVOICE?><?end for-each?>
    <?if:TRX_NUMBER=’142’?>
    <?import:xdo://XXIH.XXNR_XXINVPRINT_SUB.en.FI/?>
    <?start:body?><?call:Header?><?call:Line?><?call:Weights?><?call:Banks?><?end body?><?call:Footer?>
    <?end if?>
    <?if: TRX_NUMBER=’144’?>
    <?import:xdo://XXIH.XXNR_XXINVPRINT_SUB.en.US/?>
    <?start:body?><?call:Header?><?call:Line?><?call:Weights?><?call:Banks?><?end body?><?call:Footer?>
    <?end if?>
    Prints out always in English and never the Finnish translation.
    Program goes fine to if branch but does not print out Finnish
    Does anybody know what could be wrong?
    BR
    Kari

    Thanks Amit,
    I have two layout, main-layout and sub-layout
    Main layout call subtemplate
    I have registered layout and xliff-file
    Main template
    Localized Templates
    File Name           Language Territory
    XXNS_INVOICE_MAIN.rtf      English
    SUB template
    Localized Templates
    File Name           Language Territory
    XXNS_INVOICE_SUB.rtf      English
    Translatable Template
    File Name           Language      Territory
    XXNS_INVOICE_SUB.rtf      English      United States
    Available Translations
    Language Territory Progress
    English Finland Complete
    If main report call subtemplate and finish xliff tranlation
    <?import:xdo://XXIH.XXNR_XXINVPRINT_SUB.en.FI/?>
    Prints out fine with Finnish translation
    But if I want in main program to check what language is used e.g.
    if....
    <?import:xdo://XXIH.XXNR_XXINVPRINT_SUB.en.FI/?>
    .....end if;
    if....
    <?import:xdo://XXIH.XXNR_XXINVPRINT_SUB.en.US/?>
    .....end if;
    Prints out always in English and never the Finnish translation.
    Program goes fine to if branch but does not print out Finnish
    Do you it's set up problem or program problem
    BR
    Kari

  • How to sync different image folders from pc without removing images from ipad

    how to sync different image folders from pc without removing images from ipad as ipad asks to replace the already existing images in ipad with the pc folder.

    Spare yourself the frustration, use Photo Manager Pro.
    https://itunes.apple.com/sg/app/photo-manager-pro/id393858562?mt=8

  • Basically... I had an ipod touch sync'd to my dads i tunes.. i then got an iphone and created my own apple id.. how could i transfer the media from my ipod which was used on a different apple id onto my own account without everything deleting

    basically... I had an ipod touch sync'd to my dads i tunes.. i then got an iphone and created my own apple id.. how could i transfer the media from my ipod which was used on a different apple id onto my own account without everything deleting

    Syncing an iDevice to a computer does not remove content from the computer.
    Syncing an iDevice to a computer that it does not normally sync with will remove the content from that device.
    If the media was acquired with a different Apple ID it is in no way linked to your Apple ID.

  • How to print/list all the groups/users present in Weblogic using Java code

    Hi,
    Weblogic version : 11.1.1.5
    How to print/list all the groups/users present in Weblogic using Java code
    I want to make a remote connection to Weblogic server and print all the users/groups present in it.
    I have gone through the below mentioned site, but I cannot use the same approach since most of the API' are deprecated for example "weblogic.management.MBeanHome;"
    http://weblogic-wonders.com/weblogic/2010/11/10/list-users-and-groups-in-weblogic-using-jmx/
    Thanks in advance,
    Edited by: 984107 on 05-Feb-2013 05:26
    Edited by: 984107 on 05-Feb-2013 22:59

    see this http://www.techpaste.com/2012/06/managing-user-groups-wlst-scripts-weblogic/
    Hope this helps.

  • How can I remove ASCII text from a field when I use it in a query

    How can I remove ASCII text from a field when I use it in a query?
    I am running a select statement on a table that appears to have ASCII text in some of the fields. If I use these fields in the where statement like the code below nothing returns:
    SELECT FIELD1 FROM TABLE1 WHERE FIELD1 IS NULL
    But the field looks empty if I do a straight select without the where clause. Additionally, one of the fields has text but appears to be padded out with ASCII text, which I need to strip out before I can use this field in a where or join statement. I have tried using a trim, ltrim, rtrim, to_char, nvl, decode and nothing works. When I use excel to run the same query it looks as if these ASCII fields are boxes.
    I have asked our DBA team to see what they can do to prevent these from going into the table, but in the mean time I still need to run this report.
    Do you have any suggestions?

    Can you provide an example? I've been trying (for
    example) "select translate(' test one', ascii(' '),
    'X') from dual" with no luck.
    Thank you.To replace space, you should query like this:
    select translate(' test one', chr(32), 'X') from dual instead of select translate(' test one', ascii(' '), 'X') from dual Thanks,
    Dharmesh Patel

  • Why can't I get my printer to print out a playlist from i-tunes? It used to work but now my printer doesn't seem to receive the "print" command.

    Why can't I get my printer to print out a playlist from i-tunes? It used to work, but now the printer doesn't seem to recognize the "print" command coming from i-tunes. The printer works for other applications!

    I  finally solved this problem after toiling with it for a couple of  days.  Solution:  Once you have  burned your CD you must go back into  iTunes to your music/playlists and select the playlist you just burned  and click file; print and you will  get the mosaics that we have been  accustomed to.  I was on hold with  Apple Support when I found this  myself.  Yes......!!! Problem solved..for me anyway.  Good luck!
    Scott

  • How can u insert and retrieve text files in any format using forms6i.

    how can u insert and retrieve text files in any format using forms6i.
    can u give me an example of an insert statement, let's assume the file is located in the a:drive.
    and retrieving the files, i would give the user a list of all the files that are in the database, the user would select one, but what command(or piece of code) would open the file in its apppropriate editor.
    e.g .pdf formatted file would open in acrobat.
    any help would be appreciated.
    Thanks
    Hussein Saiger

    the filereference class is for downloading and uploading files.
    if you want to load xml, use the xml class.
    and, if you want to write to an xml file and don't want to use server-side code, wait.

  • HOW TO PUBLISH YOUR WEBSITE ..FROM IWEB ..WHEN I USE TO USE MOBILE ME .. BUT NOW THERE IS NO MOBILE ME BECAUSE OF ICLOUD, AND ICLOUD DOESN'T SUPPORT IWEB PUBLISHING?

    HOW TO PUBLISH YOUR WEBSITE ..FROM IWEB ..WHEN I USE TO USE MOBILE ME .. BUT NOW THERE IS NO MOBILE ME BECAUSE OF ICLOUD, AND ICLOUD DOESN'T SUPPORT IWEB PUBLISHING?

    When MobileMe goes down the drain, you will need to move your website to standard hosting. Depending on your site size, I recommend A Small Orange, as the Tiny hosting plan they have is big enough for most iWeb sites and much cheaper then shelling out $6 a month for most of the other big names, and if you check out their forum, several of the members have coupon codes in thier signatures. Also, their customer service is great and very fast in getting back to you.
    To upload, I publish the iWeb site to a folder, then using Cyberduck upload it to the host. Cyberduck beats iWeb's FTP uploader because Cyberduck only replaces updated pages, instead of uploading the entire site.
    I hope this helps!

  • How do I remove an extension from safari?  I am using safari 6.0.5.  I loaded an extension curiyo yesterday and it is limiting my clicking on safari now.  I want to uninstall it.  Please help.  Thanks.

    How do I remove an extension from safari.  I am using safari 6.0.5.  I am trying to remove curiyo which has limited my clicking ability in safari.  I cannot seem to find safari options or extensions to uninstall the program.

    Hi...
    From your Safari menu bar (top of your screen) click Safari > Preferences then select the Extensions tab.
    Just click uninstall.

Maybe you are looking for

  • Blackberry Z 10 Charging Problems

    I Have problems With my B Z10. When i plug in my charging device that came with my B Z10. A tells me i have to use the charging device that came with? but i am using the same charging device* My phone just blacks out and doesnt show how many % are le

  • Routers forward multicast video packets so slowly

    hey guys I have a problem with multicast, here is the senario. I have a video Server that sends streams in multicast to its clients. the clients in same subnet with server don't have any problem and receives streams clear but the clients that are not

  • X-axis chart

    I am having trouble clearing a chart that read in a waveform from a analog daqmxbase read vi. I wired an empty array to the history node of the chart. It clears the the waveform on the chart, but it does not reset x-axis values to zero. It keeps star

  • HT1692 I lost 4months of my calendar. How do I get it back?

    I lost the first 4 months of my iPad calendar. How can I get it back?

  • Export data to excel from jsf

    How can I export data to excel sheet using jsf ..Any components available.. Thanks in advance.