HTML to Image Format

If I run this class:
import java.awt.*;
import java.io.*;
import javax.swing.*;
public class Main {
    public static void main(String[] args) throws FileNotFoundException,
            IOException {
        StringBuilder htmlCode = new StringBuilder();
        FileReader htmlFileReader = new FileReader("test.htm");
        BufferedReader htmlFileBufferedReader =
                new BufferedReader(htmlFileReader);
        String aLine;
        while ((aLine = htmlFileBufferedReader.readLine()) != null) {
            htmlCode.append(aLine + "\n");
        JFrame frame = new JFrame("test");
        frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        JEditorPane editorPane = new JEditorPane("text/html",
                htmlCode.toString());
        editorPane.setMaximumSize(new Dimension(640, 700));
        editorPane.setSize(new Dimension(640, 700));
        editorPane.setBackground(Color.WHITE);
        editorPane.setPreferredSize(new Dimension(640, 700));
        frame.add(editorPane);
        frame.pack();
        frame.setVisible(true);
}Then the HTML file displays correctly to the screen.
How could I get it to give me an array of pixel colors or something else that I can take as an image and input into a PDF Generator like iText or PDFBox.
Also, could we get a better resolution or anti aliasing in order to make the it look better for printing?

This has been moved to the Swing forum under the title "High Resolution HTML to Image Conversion"

Similar Messages

  • Can't select text when export in HTML and Images

    I am entirely new to Fireworks and I can't find anyone to teach me Adobe Fireworks. I followed some youtube tutorials but most of them are vague. I am still figuring the way to export from Fireworks to Dreamweaver, without affecting its contents like bitmap images and the text. When I export in HTML and Images format and opened the htm file, I can't select the text I've inserted in Fireworks. Can anyone tell me what I should do?

    I cant scroll below or above viewable section of text in any of my Macbooks, iMac, Mac Mini. Never have been able to, never could, except by pressing the arrow keys whilst selecting, to move up or down.
    Its stupid
    I dont have flash installed (never will do since my first virus of video ad sound running in background from Cnet was downloaded and kept returning until i deinstalled flash).
    I believe that this is a universal issue because none of my Macs can scroll out of screen when selecting text, which as a webmaster and developer, is a pain in the butt
    My issue is not in word documents, its in everything

  • Preferred image format for RH 7 html

    I am working on updating the help documentation for a piece of software my company distributes.  We insert copius amounts of screen shots to help demonstrate how to use our software.  I've used the RH screen capture tool and it appears more than satisfactory.
    My question is, is there a preferred image format that most people use when inserting images into RH projects?
    I'm trying to find a happy medium between picture size and picture quality, since many of our customers download our products we want to streamline it as much as possible.  Any input would help...thanks!

    Hi there
    For what it's worth and speaking only for myself, I'm almost exclusively using .PNG as my preferred format.
    Cheers... Rick
    Click here for Adobe Authorized Captivate and RoboHelp HTML Training
    Click here for the SorcerStone Blog
    Click here for RoboHelp and Captivate eBooks

  • Problem in HTML and HTMLCSS format of reports

    Hi
    I'm using Report Builder 10.1.2.0.2 to build a tabular report, in the repot preview everything is ok but in the real time I have two problems :
    1- When I try to generate html file or access the report with desformat=html some graphical formats like lines and background colors are gone!. When I see the source of the generated HTML file the tables border is 0. I changed the border to be 1px with solid style and black color but nothing happened.
    2- When I try to generate htmlCSS file or access the report with desformat=htmlCSS the graphics is there but when I print the report there is some shift between the generated page and the printed page i.e: the printed pages are not the same like the report's pages. I added some code in the after page property as a page break but nothing changed
    Any help will be appreciated
    Thank you in advance

    Hi
    The best way to organize data and images to get them next to each other is to use a table (no borders) in your RTF template. Create a two celled table and drop the image into one and the text next to it.
    Regards
    Tim

  • How to convert EPS(image file) file in to other image format e.g NIGMAS

    Hi friends,
    I want to make a tool which will help to convert the EPS image file into other image format BY USING JAVA TECHNOLOGY. I havent done this type of file conversion before, so any body please explain it to me from the basic how can i go for it, what r the require things, where should i get the help of it, which java API should i use etc. i ll be vry thankful.
    My actual requirement is i want to convert the EPS file into the NIGMAS(Nihon computer graphic mapping System) file format.
    Thank you in anticiption.

    The easiest, but not necesarily the best, way is to use ImageMagick's convert utility. From Java you can use Runtime.exec to invoke convert.exe ... ImageMagick is opensource and supports many different formats ( www.ImageMagick.com )
         * Converts an eps file to a graphic that is suitable for the web.
         * We use ImageMagick's 'convert' utility to convert .eps files into either gif or png format.
         * The output format is determine by the extension that you set for the output file.
         * Sample command:
         * convert -density 208x208 /export/home/kpmg/tomcattest/jsp/1.eps
         *                                    /export/home/kpmg/tomcattest/jsp/1.png
         * Although convert supports about 100 different parameters, we are only using 1:
         * -density     (sets the vertical and horizontal resolution in pixels of the image)
         * Density sets the vertical and horizontal resolution in pixels of the image.
         * It should be changed based on the resolution of the user's monitor
         * (e.g. if hi-res display settings, then density will need to be greater
         * than if running on a low-res display, which would make the same image look really big )
         * You may want to use other convert parameters, such as -sharpen
         * to make the image look better, or -compress and
         * -quality to change the kb size of the image.
         * For the full list of parameters see:     
         *      http://www.imagemagick.org/www/convert.html
         * @param inFile The absolute path to the eps file to be converted
         * @param outFile The absolute path to the desired output graphic file.
         *                         NOTE: the format of the output file is determined by the
         *                         extension that you give for this parameter (e.g. file.png will
         *                          be written as a png file )
    public void eps2www(String inFile, String outFile, String density) throws Exception
              // use ImageMagick's convert program to make the www version ( png or gif, etc)
              String call = convert +
                        " -density " + density +
                                  " " + inFile +
                                  " " + outFile;
              try
                   Process child = rt.exec( call );
                   child.waitFor();
                   log.debug("Convert process exit code is: " + child.exitValue() );
              catch (Exception e)
                   // TO DO: this could probably be more explicit
                   throw new Exception(e);     
              // log the command strings for debuggin purposes.
              log.debug( "Convert Successful: call = " + call);
         }

  • Intermittent "Unsupported image format" message with either CR2 or DNG

    I am seeing "Unsupported image format" messages once files created by a Canon EOS 1Ds Mark iii (+stored in Canon's CR2 file format or when the same file is converted to Adobe's DNG file format+) have been imported into Aperture.
    Some files will import and be viewable. However, most of the time the files are not viewable. This occurs even after updating Aperture to 1.5.6.
    Is anyone else seeing problems with CR2 or DNG files created by Canon EOS 1Ds Mark iii?
    Has anyone see a solution?

    I think Support is confused with the Canon camera models.
    10.5.1 supports 1D Mk III, but only 1Ds Mk II.
    (http://docs.info.apple.com/article.html?artnum=306835
    http://www.apple.com/aperture/raw/cameras.html)
    I don't believe that 10.4.11 supports anything that 10.5.1 doesn't support. In fact, the docs at http://docs.info.apple.com/article.html?artnum=306297 say "Adds RAW image decoding support for the following cameras: Panasonic Lumix DMC-FZ50, Leica V-Lux 1, Olympus E-400, Olympus EVOLT E410, Olympus EVOLT E510, Canon EOS 40D" (the 1D Mk III came in the 10.4.10 update.)

  • Unsupported Image Format when inporting from my new Canon 400D (KISS X) CAM

    Could someone please tell me why Apeture is giving me the Unsupported Image Format notice when trying to view and import Raw images from my new Canon 400D camera? I can view the photos on my Canon software. Is it possible that just becase the file is 10.1 MP on my new cam instead of the 8mp that my rebel XT (350D) was that Apeture can not use the format? If in fact this is the case, what can i do to get the 300 plus photos that I just shot at a paid photo shoot into Apertue and still be able to work with them raw?
    I would be grateful for any help I can get.
    Thank you.
    Stan

    Two problems with this workflow:
    1) A 16 bit TIFF file is 52 megabytes. Ouch. Reading them bogs down my little MacBook like you wouldn't believe. I may have to work with JPEG or, god forbid, use Photoshop until Apple's devs can get support for the XTi
    2) Aperture seems unable to figure out the colour balance of the TIFF files. I added a bit of saturation and colour correction (working in the Adobe RGB space) in Canon DPP, but Aperture seems to totally screw up on these files. http://images.dasmegabyte.org/wine_tour/large-37.html almost no detail at all in those bins (plenty in the RAW) and I had to boost the gamma on the web gallery by 1.2x so they didn't look fire engine red.
    MacBook Pro   Mac OS X (10.4.8)  

  • CR2 as "Unsupported Image Format" on Aperture 2.1.2?

    I just installed aperture on OS 10.5.5 and immediately installed the available update via Software Update. Then, I imported a day's worth of shooting from my EOS 1D Mark iii (one of the models listed on Aperture's Supported Raw Formats webpage - http://www.apple.com/aperture/specs/raw.html). The .jpegs display fine but my CR2 images only appear as preview thumbnails - when I click on the preview a red box appears with the text: "Unsupported Image Format." I'm a bit incredulous that Apple would fail to support this enormously popular image format - say it ain't so.
    Message was edited by: Alexandra Latta

    Excellent information that confirms my experience. It has only happened to me in the midst of an editing session, and has always been corrected by a restart of the application.
    I don't know if it answers Alexandra's original question.
    I have also found that Aperture has gotten progressively slower over the last few months, perhaps a function of a growing managed library?? It's to the point where if I edit to fast, I'll start getting beachballs, and have even had the app quit -or go to the red screen/unsupported file type message.
    I don't have the latest machine, but it is a fast one, (Mac Pro Quad 3.0 Ghz 11 gb ram and the nVidia 8800 GT graphics card driving 2 23" Cinema Displays) My startup drive is a 750GB Seagate Barracuda partitioned 250/500 with everything but the Aperture library on the 250 partition (100 gb free space left) and only the Aperture library on the 500 partition (aprox 200 GB free). (there are also 3 more 750 gb drives in the machine for Time Machine & other stuff.
    This machine should be really fast (it once was) so I may be doing something wrong, but can't figure what is wrong.
    Is anyone aware of an article on speeding up aperture? My previews are limited to the default (2500 x2500 aprox) yet my activity window always seems to have a backup of previews to be built once I'm going in an edit session.
    Any advice would be appreciated.
    Thanks

  • Canon G9 Raw - "Unsupported Image Format"

    I am using Aperture 1.5.6. When I went to import in Aperture RAW images from my new G9, the appear as "Unsupported Image Format." I do not have this problem when importing from my Nikon D2sx. Any suggestions??

    Rather annoyingly, you're right. While everyone has been criticising how RAW support is in the OS, Apple seems to have taken this a step further and included G9 support in the OS, but not in a way that Aperture 1.5.6 can use. On the page:
    http://www.apple.com/aperture/specs/raw.html
    they have asterisks beside a variety of new additions which require 10.5.2 (or 10.4.11) and Aperture 2. I've run the additional Leopard graphics update, reimported the G9 RAWs and this changes nothing in 1.5.6. A trial copy of Aperture 2 on another machine has no problems.
    I guess this means that Aperture 1.5.6 users are no longer supported for newer cameras (including ones which have been out for some time).
    D

  • Microsoft's Hew Image Format: HD Photo

    Microsoft has created a new image format called HD Photo
    which is being
    touted as a "JPEG Killer." Adobe has reportedly already
    created a
    Photoshop plugin for it, yet I never even heard of it until
    today.
    Can someone who knows more about graphic design fill me in on
    the big
    picture? Is HD Photo going to be a standard that will truly
    rank among
    .gif's and .jpg's, or is it too early to tell? Is it in a
    class by
    itself, or will it have competition?
    I'm aware of SVG images and thought they were supposed to be
    the in
    thing, but they haven't yet made much of a splash as far as I
    can tell.
    Thanks.
    www.geobop.org - Family Websites
    www.invisible-republic.org - Adult political websites (Mature
    adults only)

    HD Photo is the new generic name for Windows Media Photo.
    Microsoft is submitting the spec for approval as an open
    standard for global
    adoption i.e. supersede JPG, which is a tired format with
    limitations.
    To maximise the chances of that happening they removed the
    Microsoft-centricness from the name.
    From
    http://news.com.com/Photoshop+gets+HD+Photo+support/2100-1046_3-6165425.html:
    "HD Photo compresses images more efficiently, supports richer
    colors and can
    record subtler tonal detail (than JPG), Microsoft argues."
    See
    http://en.wikipedia.org/wiki/HD_Photo
    The WMP spec can be found here:
    http://www.microsoft.com/whdc/xps/wmphoto.mspx
    Still they've got a tough job ahead. JPEG2000 tried a few
    years ago and did
    not get very far.
    Just because a technology is superior doesn't mean it'll
    achieve ubiquity.
    Regards
    John Waller

  • DNG indicating "Unsupported Image Format"

    Since X3F raw files (Sigma Photo SD9, SD10, SD14) are not supported, I read that I could batch convert the files to DNG in order to import them into Aperture. I downloaded the free app from Adobe but no matter what settings I use, the files do load and show the jpeg preview, but goes to the red warning that the image format is not supported. I tried with and without the embedded raw file and everything I could think... there are not a lot of options as the software is very simple.
    My questions are:
    1-Is it possible to load DNG files into Aperture?
    2-Is there a way to add X3F import capability with a third-party plugin?
    Thanks!

    I read that I could batch convert the
    files to DNG in order to import them into Aperture.
    I don't know where you read it, but it's not true...
    My questions are:
    1-Is it possible to load DNG files into Aperture?
    Yes, but only for camera models that Aperture already supports. If you do a search of the forum you'll see lots of discussion about this, and how DNG is not quite the 'universal' RAW format that some people hope it to be.
    2-Is there a way to add X3F import capability with a
    third-party plugin?
    No. All you can do if you want to put your Foveon images into Aperture is to convert them in something else and import the results.
    I'd recommend going to http://www.apple.com/feedback/aperture.html and requesting support for the cameras.
    Ian

  • HTML to Image (TIFF)

    Hello there,
    I am developing a small J2EE application for which I will need to take a string of HTML and somehow convert it to an image format - TIFF is prefered - and upload it to a document management system.
    Can someone suggest a way of doing this?
    Thanks,
    Morten

    Did any one get this to work. I want to do the same thing. I am looking for all the help I can get.
    Thanks
    Larry
    maybe this example will help you,
    we use it to read and write images in a servlet
    public void read(String id, OutputStream out) throws
    TechnicalException {
    FileInputStream fileinputstream= null;
    String filename=EnvironmentSettings.RESOURCEDIRECTORY
    + id.toLowerCase();
    try {
    fileinputstream= new FileInputStream(new
    File(filename));
    int c= 0;
    while ((c= fileinputstream.read()) != -1) {
    out.write(c);
    out.flush();
    } catch (FileNotFoundException fnfe) {
    PPSLogger.log(PPSLogger.ERROR, "Read error in
    PPSFileContentHandler: Failed to find the file:
    "+filename );
    } catch (IOException ioe) {
    PPSLogger.log(PPSLogger.ERROR, "Read error in
    PPSFileContentHandler: Failed to read from the file:
    "+filename);
    if (fileinputstream != null) {
    try {
    fileinputstream.close();
    } catch (IOException e) {
    PPSLogger.log(PPSLogger.ERROR, "Read error in
    PPSFileContentHandler: Failed to close the
    inputStream.");
    * @see
    nl.aegon.sscp.pps.gebruikersadministratie.util.content.
    ontentHandler#write(InputStream, String)
    public void write(InputStream inputStream, String id)
    String filename= EnvironmentSettings.RESOURCEDIRECTORY
    + id.toLowerCase();
    try {
    OutputStream os= new BufferedOutputStream(new
    FileOutputStream(new File(filename)));
    byte[] buffer= new byte[8192];
    int bytesRead= 0;
    while ((bytesRead= inputStream.read(buffer, 0, 8192))
    != -1) {
    os.write(buffer, 0, bytesRead);
    } catch (FileNotFoundException fnfe) {
    PPSLogger.log(PPSLogger.ERROR,"Write error: Failed to
    find the output file: " + filename);
    } catch (IOException ioe) {
    PPSLogger.log(PPSLogger.ERROR,"Write error: Failed to
    write to the output file: " + filename);

  • Options for image format and encryption when creating disk image?

    I am trying to help someone via email, so I am not positive that he is doing everything I tell him .
    He was having problems with creating a disk image of his project, but I thought he was getting it now until he sent me a message asking what settings I select when creating a disk image. He included a picture that has the options in drop-down bars. The first two are not a problem, but I don't know where the second two are coming from, as I have never gotten those:
    +Save As: [Name of project]+
    +Where: [Location]+
    These two are what I see each time I do a 'Save as disk image' but he also has a block with these other two options, that I have never seen. I put his default selections in the brackets:
    +Image Format [read-only]+
    +Encryption: [none]+
    I took a look at iDVD's options for archiving a project, thinking that he had done that, but I still do not get these options.
    Any information appreciated.

    Beverly Maneatis wrote:
    ... How do I get a screenshot into these replies?
    send me an email, Bev, I'm shy to publish here that simple html code.. (picture has to be on some webspace...) .. I want to avoid, some 'beginner' posting here 10Mpixel vacation pics....

  • How to change the bar chart rendering image format in SSRS

    Hello all,
    I am working with SQL Server 2008 R2 and I have a SSRS bar chart report, when the report got rendered over online or if the take Export (PDF and PPT), the image is in png format always, which is taking too much of time to execute the report in case of large
    data.
    Can, It be possible that the rendered image is in jpeg format instead of png.
    If Yes, please share the appropriate steps to follow:
    Thanks in advance
    Pankaj Kumar Yadav-

    Hi Pankaj067,
    According to your description, you want to change the bar chart rendering image format as JPEG format when previewing the report or exporting to a PDF file .
    In Reporting Services, the chart rendering image format is PNG by default. It’s a by-design behavior. And it doesn’t open any API for us to change the image type when exporting a chart to a format. So in your scenario, your requirement can’t be achieved
    in Reporting Services currently. I would recommend you submit a feature request to Microsoft at this site:
    https://connect.microsoft.com/SQLServer. So that we can try to modify and expand the product features based on your needs.
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • "Unsupported Image Format" all of a sudden, with previously workable files

    Folks,
    I've got an issue that seems very strange indeed.
    Months ago, I bought a Pentax K20D. I also bought a 17" MacBook Pro and Aperture. Camera and Aperture played well together.
    I encountered the known issue with white spots on the image when using the 2-second timer for long exposures. I read about how the Pentax firmware update 1.01 changed the EXIF Make information, causing Aperture to be unable to read the K20D PEF RAWs. So I waited.
    When Aperture 2.1.1 was released (and I think the Apple RAW update), I installed both of those. When I heard through this forum that the updates fixed the problem, I also updated my camera's firmware and confirmed that it worked.
    So smooth sailing for a few months on Aperture 2.1.1, OS 10.5.3 (or .4, I forget), and K20D firmware 1.01.
    Then I bought a Mac Pro 8-Core with 10.5.4 on it. I sold the 17" MacBook Pro. I used the Migration Wizard to move my user account from one machine to the other, but did a fresh install of all applications. (I've been an Apple tech for the past 7 years, and have various certifications. I know the user transfer process isn't perfect, but it should have the following results... read on)
    Now, in Aperture 2.1.1 on 10.5.4 with all updates, PEF RAWs taken with K20D firmware 1.01 that were previously edited, manipulated, etc just fine on my MacBook Pro say "Unsupported Image Format" in a big reddish-black box when I try to view the master. If I switch to Quick Preview, it displays just fine, but is un-adjustable. Additionally, any NEW images I copy from my K20D show in the Import window as being 0x0 pixels (or occasionally 160x120 pixels) and will only show a tiny preview or "Unsupported Image Format." All PEF RAWs taken with K20D firmware 1.0 are just fine.
    So here's what I've done:
    1) Tested a fresh install of 10.5.4 on another HD in the Mac Pro. Installed Aperture 2.1, updated to 2.1.1. This should be perfectly clean. It gives the "Unsupported Image Format" error with any new images from my K20D. Copying the library from my other partition gives the same problems as described earlier.
    2) Tested a fresh install of 10.5.3 on another partition in a Macbook Pro. Installed Aperture 2.1, updated to 2.1.1. Applied the Apple RAW update and iLife enhancements. It gives the same errors as before.
    3) Tested a fresh install of 10.4.11 on another partition in a Macbook Pro. Installed Aperture 2.1, updated to 2.1.1. This worked perfectly for all PEFs and DNGs.
    4) Took a month-old backup (from when everything was working just fine) of my Aperture Library and loaded it into all of the above configurations. Same results!
    So what is the deal here? Aperture all of a sudden can't read images that it itself was able to edit a month ago? How come it works just fine in 10.4.11? This seems really messy. I have essentially lost a lot of the work I've put in.
    I can use DNGs moving forward, but my past work is now messed up, and the DNGs are almost 75% bigger than the PEFs!
    Anyone have any ideas for resolution or should I just call Apple?
    Message was edited by: MonsieurBon

    If it's any consolation, I had the EXACT same problem today; just opened Aperture 2 and my entire library of images shows "unsupported image format' -- the thumbnails are still intact but clicking on any image suddenly shows the red screen.
    Same situation, these images were previously editable and accessible. We had a power outage an hour ago and initially I thought my library had crashed, but I was not actually using Aperture 2 at the time of the outage so I don't think that's the case.
    Given the relatively sparse attention Apple gives to these forums, I don't expect there will be a quick response.
    I have Leopard 10.5.4 installed, I don't have access to another version of the OS to see if I can get it work. If I'm not mistaken, wasn't there a series of Software Updates recently? I click on these without really checking the apps that are affected; could Aperture have been one of the apps 'revised' by the recent update?

Maybe you are looking for

  • OS X won't show OS X partition, but shows up (and works) in both Linux and Windows.

    My Macbook Pro (early 2010, Intel 160 SSD) stopped working this weekend. I got the white screen with a folder with a question mark inside. I checked if the drive was ok, and it seemed to be working, so i plugged it in a running Windows machine and bo

  • Binding Drop Down Lists

    Hello, I am trying to figure out how i can bind drop down lists. I want it so if you choose a certain selection in drop down list 1, then you are only able to pick a certain selection out of drop down 2. So basically each selection in drop down 1 wil

  • Lost Pictures from IPhoto

    i was burning some discs from my MacBook yesterday, exporting from IPhoto to Finder, i had a large amont of pictures in Finder so i put them into trash, i needed to return to IPhoto and found that my 11 years of pictures had gone. Help please

  • AIR Badge Install fails on Macromedia Certificate Error

    I noticed my AIR Badge installer stopped working with the message "A download error occurred, would you like to try again" when the person did not have Adobe AIR installed previously.  The badge installer is supposed to download AIR seamlessly as par

  • Sort Multiple Times on Hash Table

    I have a hash table that the key is id, value is a string of first name, last name, and age. for example: Hashtable showHT = new Hashtable(); showHT.put(person.getId(), person); <--- person is an object that contains all information How to do sorting