Appending images in memory

Posted on 2009-05-01
Last Modified: 2013-11-08
I am writing an aspnet page that gives the user a link to view the data's associated image.  Due to the size of these images, we have broken them down from one large file with 4 pages, to 4 files with 1 page.  They are managed via a file structure.  For instance:


When the user clicks on the link, I wish for Adobe to display all four pdfs as if they were one, so they can click and page through it.  I do not want to create a temp file and append to it so I can work with it that way.  Also I don't wish to embed the image inside of web page, because would like the native apps like Adobe or Windows Picture and Fax viewer to open my images.  Is there a way to loop through the folder and append files in memory and then pass it as an argument to perhaps proc.StartInfo.FileName = fileInMemorySomewhere?  Suggestions welcome.  thanks

string pathFilename = "";

Process proc = new Process();

proc.StartInfo.FileName = pathFilename;


Open in new window

Question by:SpokaneISD
    LVL 9

    Accepted Solution

    Unfortunately, as far as I know, the way the programs you want to use work require the image to be on your hard-disk, not in memory. I may be mis-understanding what you mean, but here's an example of how you would go about starting the files in the ABC example you gave. You'd call this function, passing the full path to your FolderABC, which would then find all files with the .pdf extension in the top level of that directory (the third parameter gives you the option of either recursively searching the folder, or just a top-level search, which I have excluded).
    void ViewAllPictures(System.String pathToFiles)
         foreach(System.String file in
              System.IO.Directory.GetFiles(pathToFiles, "*.pdf"))
              // Just call the static method Start instead of
              // creating a new Process instance, unless you have
              // a reason to maintain a reference to the process.

    Open in new window


    Author Comment

    I was hoping to be able to loop through the files in my directory and displaying them without saving them on hard-disk, but getting the process to "pretend" all the files were actually one file, so they could click next-page, previous-page, and so on.  Looks like I may have to embed them into a browser window.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
    This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now