View Doc (pdf, image, .doc) imported as BLOB files in UIImageView within a UIScrollView.

Hi,
I am new to IOS programming and after researching on topic i found post saying it is possible to view BLOB file in uiimageView.
I have already done sucessfully for BLOB file of Image. but i can not view pdf file, even if i got NSData.
/****** from SP ****/
Insert TestBlob(tbName, tbDesc, tbBin) Select
'Test.pdf','PDF file', BulkColumn from Openrowset( Bulk
'C:\blob\udoc\81.pdf', Single_Blob) as tb
/****** from my App *******/
NSString *strImage; // String has BLOB file from DB
NSData *imageData = [self dataFromBase64EncodedString:strImage];
UIImage *image = [UIImage imageWithData:imageData];
UIImageView *m_oImageViewer = [[UIImageView alloc]init];
m_oImageViewer.image = image;
m_oImageViewer.frame=CGRectMake((self.view.frame.size.width/2)- 250,60,500,500);
[self.view addSubview:m_oImageViewer];
-(NSData *)dataFromBase64EncodedString:(NSString *)string{
if (string.length > 0)
     NSString *data64URLString = [NSString stringWithFormat:@"data:;base64,%@", string];
    NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:data64URLString]];
    return data;
return nil;
Please help me. i have already viewd Image but PDF comming empty. i do not want to edit or do anything only user should be able to view uploaded Doc from IPD App. and Doc can be image, pdf or .doc or excel sheet. i get BLOB file for all file types which i pass to my App.
IS what i am doing is correct? as i imagine BLOB is common for all file Types. still i can not see pdf file(i have not tried other file formate only .png and pdf).
Please guid me if i am missing anything.

Hi Sreelatha. The best example code for your purpose is the Scrolling sample app I referred to previously. The word Scrolling in that post is a link to the download page. I think that code will answer all your questions about how to init a UIImage, then use it to init a UIImageView, and then position the UIImageView frame in a UIScrollView. Two cases are demostrated: 1) Scrolling horizontally through a series of images; 2) Scrolling both H & V over a single image which is several times larger than the window.
You might also be interested in the PageControl sample app in case you want to add a page control to your scroll view.
Reading your last post again... I sure hope we've been discussing images (like jpegs?) in this thread. This isn't about reading and rendering the actual xls, pdf and doc files, is it?? Of course the iPhone handles html beautifully, so for example, an html representation of a doc file would play nicely. But in that case you'd want a UIWebView, not a UIImageView.

Similar Messages

  • How to display.xls, pdf, .doc files in UIImageView within a UIScrollView.

    Hi,
    I am new to iPhone programming. I need some help.
    I want to display .xls, pdf, .doc files in UIImageView within a UIScrollView programtically how can i do this. What is the procedure.
    Pls. provide me a sample application.
    If anyone knows pls. respond it would be of great help for me.
    Thanks in Advance,
    Regards,
    Sreelatha.

    Hi Sreelatha. The best example code for your purpose is the Scrolling sample app I referred to previously. The word Scrolling in that post is a link to the download page. I think that code will answer all your questions about how to init a UIImage, then use it to init a UIImageView, and then position the UIImageView frame in a UIScrollView. Two cases are demostrated: 1) Scrolling horizontally through a series of images; 2) Scrolling both H & V over a single image which is several times larger than the window.
    You might also be interested in the PageControl sample app in case you want to add a page control to your scroll view.
    Reading your last post again... I sure hope we've been discussing images (like jpegs?) in this thread. This isn't about reading and rendering the actual xls, pdf and doc files, is it?? Of course the iPhone handles html beautifully, so for example, an html representation of a doc file would play nicely. But in that case you'd want a UIWebView, not a UIImageView.

  • Image problems importing Illustrator 10 file into Flash MX.

    Hello,
    I'm working on my portfolio and want to import an Illustrator
    (version 10) file into Flash (Flash MX). The problem I'm having is
    that when I import the Illustrator file into Flash, it comes out
    looking blurred. I tried exporting the Illustrator file into
    Photoshop and saving it as a JPEG, PNG, and TIFF (in each file
    format, changing the image size to 72 dpi) and I still get the same
    blurred result. I also tried saving the file for web, in
    Illustrator (in JPEG and PNG formats) with no success as well.
    The Illustrator file is a small collage of my graphic design
    work (where I pasted graphic work done in Illustraor and made
    clipping masks to collage them together), so I'm not sure if
    bringing these files together maybe causing some technical issue or
    is importing Illustrator files into Flash just something that will
    always appear blurred. If so, is there a way I can bring the file
    into Photoshop and work with it where I can import it without the
    blurred appearance?
    Any help will be greatly appreciated.

    Hi Matthew,
    Here's the Help doc that talks in more depth about Smart Objects:
    http://help.adobe.com/en_US/photoshop/cs/using/WS41A5B796-6846-4e95-8459-95243441E126.html
    And here's a section that goes into more detail on Placing files:
    http://help.adobe.com/en_US/photoshop/cs/using/WSfd1234e1c4b69f30ea53e41001031ab64-78f2a.h tml#WS634E6022-BC34-4aa8-857B-21D88D4C8D50a
    We have multiple request to add support for externally linked files and certainly see the value. There also are a couple third party solutions that offer linked file behavior (I'm not sure what versions of Ps they work with). You can see and add to the request (and find the third party solutions) here:
    http://feedback.photoshop.com/photoshop_family/topics/please_consider_a_references_tool_to _create_links_to_layers_or_folder_groups
    regards,
    steve

  • Converting a pdf image embedded in an XML file to a PDF file

    Hi experts,
    I have an XML file which contains a PDF image of a billing document and i want to extract this PDF image and convert it into a PDF file.
    Any ideas how to do this?
    Thanks
    Ally

    Answered!!

  • Lightroom 3:  images not imported because the files can not be read:

    Nikon D700 NEF files are fine.  I can copy them to a folder and work with them in Adobe Bridge and Camera Raw. 
    LR3 will not import them to the existing catalog from the CF Disk or from a folder on the c:\drive.  I tried creating a new catalog -- the same problem occurs.
    Suggestions are welcomed.

    I have the latest version
    LR 3.4.1
    Camera Raw 6.4.1
    I created a new Catalog in c:\My Documents\LR2011\...
    Running Windows 7 64 bit
    Emptied the ReCycle bin
    Have plenty of storage...
    Now I'm getting the message:  "Could not copy file to requested location"
    Everything worked fine with LR 2 and the LR 3.0
    Since upgrading I can't read NEF files from my D700 or copy to requested location.  LR will display thumbnails, but I can not add to my now, non-existent Catalog...
    What a farce!!!

  • How to display PDF BLOB file within Forms

    Hi All:
    I just want to know if is it possible to display PDF blob file within the forms. Currently I use webutil to open pdf in browser. This time I need to display it in forms, so that upon scrolling, the user can view the pdf images of that particular record.
    TIA

    Hello,
    <p>Did you see this Java Bean ?</p>
    Francois

  • How to view the image as cylindrical view in panorama image viewer?

    i am facing the problem to view the image as cylindrical view.
    i.e, the image moved at the end position ,the image seems to jump to the start.
    instead of this the image should view as cylindrical view. i.e, that the end of the image sticks to the beginning of the image.
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.MediaTracker;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.image.BufferedImage;
    import java.io.File;
    import java.io.IOException;
    import javax.imageio.ImageIO;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.Timer;
    public class PanoramaImageDemo
         private BufferedImage biBackground = null;
         private JFrame f;
         PanoramaImageDemo()
              f = new JFrame("AniDemo 1.0");
              f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              loadBackground("C:/Documents and Settings/All Users/Documents/My Pictures/Sample Pictures/sunset.jpg");
              myPanel p = new myPanel(biBackground);
              f.add(p);
              f.pack();
              f.setVisible(true);
         private void loadBackground(String fn)
              File file = new File(fn);
              BufferedImage image = null;
              try
                   image = ImageIO.read(file);
              catch (IOException e1)
                   System.out.println("File Not Found");
              MediaTracker mt = new MediaTracker(f);
              mt.addImage(image, 0);
              try
                   mt.waitForID(0);
                   biBackground = new BufferedImage(image.getWidth(), image
                             .getHeight(), BufferedImage.TYPE_INT_RGB);
                   Graphics2D g2 = biBackground.createGraphics();
                   g2.drawImage(image, 0, 0, null);
                   g2.dispose();
              catch (InterruptedException e)
                   System.out.println(e.toString());
         public static void main(String[] args)
              new PanoramaImageDemo();
         class myPanel extends JPanel implements ActionListener
              private BufferedImage background;
              private BufferedImage bi = null;
              private int upperLeft = 0;
              int width;
              int height;
              myPanel(BufferedImage bg)
                   super();
                   background = bg;
                   width = background.getWidth() / 2;
                   height = background.getHeight();
                   bi = background.getSubimage(upperLeft, 0, width, height);
                   setPreferredSize(new Dimension(width, height));
                   Timer t = new Timer(5, this);
                   t.start();
              public void actionPerformed(ActionEvent e)
                   upperLeft += 1;
                   if (upperLeft >= width)
                        upperLeft = 38; // adjust to make rollover seemless
                   bi = background.getSubimage(upperLeft, 0, width, height);
                   repaint();
              public void paintComponent(Graphics g)
                   g.drawImage(bi, 0, 0, this);
    }plz help me regarding this concept

    I have learnt a technique when I am programming in flash.
    Assume you have a photo cat.jpg with 10 units in width and 10 units in height. You can have a view(viewport) 10 units in width and 10 units in height.
    The following shows the width of the photo:
    012345679
    To show an effect of panorama, you can draw 2 photo at any time. I assume the eyesight of a person move from left to right with 1 unit at a time.
    The original image is 0123456789.
    If the person move eyesight to right by one unit, the image become
    1234567890
    If the person move eyesight to right by one more unit, the image become
    2345678901
    You can program the by drawing 2 images at any time.
    0123456789(zero width for second image)
    123456789(0, 1 unit in width in second image)
    23456789(01, 2 unit in width in second image)
    To display part of image, try this link to a program to crop image
    http://www.java2s.com/Code/Java/2D-Graphics-GUI/Imagecrop.htm

  • Import BLOB files

    Hi,
    I need to import BLOB files in SAP in order to store and assign an employee picture for each employee. I have looked at the Data Provider:
    http://help.sap.com/saphelp_45b/helpdata/en/f1/b4a6c4df3911d18e080000e8a48612/content.htm
    -> Has someone faced the same issue and can tell me if it is possible to solve this through the Data Provider/or thanks to prgm?
    Thx,
    V.B

    http://www.oracle-base.com/articles/8i/ImportBlob.php
    This is to import any BLOB file onto table column.
    Cheers
    Sarma.

  • Insert doc/pdf/jpg into BLOB using forms (web based)

    Hi All,
    we have 81741 db on window2000(data server), forms6.0.8.20.1 on windows2000(webserver)
    & users using IE6/netscape as setup. User wants to store a pdf/doc/jpg file (stored on his PC)
    into database.
    He wants ability to view this pdf/doc/jpg later & have ability to download again to his pc. Please note
    that we have web based setup & not using HTTP server (using WebDB listener).
    I am planning to use BLOB to store the table in database, but cannot figure out what/how to force forms
    to do this.
    If someone has done this before, could you please update this thread on how to proceed.
    Thanks a lot for your input...
    Abhi.

    AS far as inserting images you can use the image item in Oracle Forms and base it on a blob column in the database.
    Regarding the other types of data you can upload them to the database using a Java function on the application server (use the java importer from Forms to call the Java class). You can use another Java function to retrieve the info from the database to the application server, and then use web.show_document to get the file from the application server to the client.
    Or you can wait a few weeks for the Webutil utility that will have this functunality built into it.

  • Is there a difference between saving a word doc with images as a pdf or printing to pdf?

    Is there a difference between saving a word doc with images as a pdf or printing to pdf. Images are sometimes missing when the document is  saved as a pdf or they are visible to the document owner but seem to disappear when viewed after submission to grants.gov. and proposal Central.
    Using Acrobat 9.5.5 and Office 2010 and Office 2011 Mac

    Is there a difference between saving a word doc with images as a pdf or printing to pdf. Images are sometimes missing when the document is  saved as a pdf or they are visible to the document owner but seem to disappear when viewed after submission to grants.gov. and proposal Central.
    Using Acrobat 9.5.5 and Office 2010 and Office 2011 Mac

  • View pdf or doc reports in obiee 10g dashboard

    Hi,
    Is it possible to view reports which are saved in pdf or doc format to view in dashboard.
    We have some static reports which are in pdf format. How to view those reports in dashboard, like by using link or image etc..?
    Thanks.

    Dear Amith,
    Thanks for your reply.
    I need to embed the pdf document not just image.
    The report generated for last month will be saved in pdf. The pdf will be paced in installed obiee folders. Now this report need to be embed in dashboard. On clicking a link or something the saved pdf should open in new window or in dashboard, so that no need of report generation based on lastmonth once again.
    Thanks.

  • How can I show files in table from BlobDomain(image,Doc,pdf etc) with icons

    Hi,
    i need to display collection of files in a table, the files have been saved as BlobDomain. Db contains different types of files (like jpg,pdf,doc etc), all files should come inside the table regardless of its types,if the file type is image then the file column will show thumb icon of the same. otherwise some other icon should come.

    Vipin,
    We need more information...
    What version of JDeveloper/ADF?
    How do you tell what the file type is - do you store it in another column or something?
    What technologies are you using as the view layer (ADF Faces, Trinidad, Swing, etc)?
    What exactly does "all files should come inside the table" mean - I assume you want to use a table (in whatever view technology you are using) to display the file names (I guess) and further if the file type is an image type, you want to display a thumbnail? If you are using JSF/JSP as your view technology - you can easily write a servlet to stream the image files and use an image component (again in whatever view technology you are using) to display the images (search the forum for an example).
    But, in general, you need to spend a few minutes to phrase a proper question - much like the respondents on this forum will take a few minutes to provide a helpful answer (when enough information is given in the question).
    Best,
    john

  • Is it possible to import a .pdf or .doc file into DVD studio Pro 4?

    When I finally finish my 2D animation for my Senior Project and finally make the DVD, I want to include the short story that the animation is based on to the DVD. I want to import it as .pdf or a .doc into DVD Studio Pro 4. What I want to know is, is if this is possible, or if is not, is there another acceptable file format that I can use if .pdf or .doc isn't possible?
    Message was edited by: obisgirl

    Techincally you can create a link to take it to the file... but there are so many different software DVD players that it doesnt work with 90% of them so its pointless..
    as for including your files on the DVD....
    First make sure your files are all in one folder called DVD Content or something like that so they know its in that location
    then in DVDSP at the top where all the icons are...
    hit build and format.
    in the general tab you will see...
    Disc
    Source
    DVD-ROM Data
    destination
    under DVD-ROM Data check the content box.
    Choose the folder you have all your files in.
    joliet extension support doesnt really matter but i always click it so that windows can identify better what file format it is.
    then continue building and formating.
    let me know if that works or if you run into an issue.

  • Pixi Plus-Can't Delete PDF or Doc View Items

    I have a long list of items on my PDF list that I can't delete.  I also have a few items on my Doc View which won't delete.  I've tried going the USB route, but nothing shows up for the PDF and I can't find a place for the Doc View.  I've also tried resetting my phone multiple times, both before and after using the USB.  Please help, wasting precious memory space!
    Post relates to: Pixi Plus p8wu0 (AT&T)

    Hello!
    There is no specific directory on the USB drive PDF view and Doc view will look for these files.  When looking at these files throught the app, are the sizes 0?   These files can be put anywhere in the USB drive side of the device and the apps would find them.  These apps do not have file management so cannot delete, must do this through USB drive mode on the device.  Plug the device into you computer and do a search on the Palm Pixi driver for .PDF and .doc files.  Once found, take note of the filepatch they reside in for future reference.

  • Can i view and edit PDF and .DOC file on iphone?

    Actually I got 2 question to ask,
    firstly have anybody got any luck to view PDF and .DOC file on Iphone because i have been trying for aged but there was no luck for me. I'm not talking about went to a email that contain a PDF or .DOC file but something like going to a website that let me able to download a PDF/.DOC. When I tried to download the file, safari keep saying that "It can not be download"??
    secondly, when is that going to be available to install third-party application to iphone such as Skype, IM+..
    appreciated everybody.

    You cannot download anything on the phone as it is not supported
    Third party applications support will start after the SDK(software development kit) is released in February

Maybe you are looking for