Looking for a convertor from HTML to PDF with J2SE

Hi all,
My current project would generate some XML data and display it on the web. Needless to say I have to prepare a matching set of XSL to transform the XML into HTML. I got that part done.
However, my project also requires a PDF output of the same XML data for download. Well, I planned to do the XSL-fo stuff on it as well. But at some point the client thought since new kind of XML data may be added and it's too troublesome to maintain 2 sets of XSLs, they are requesting a converter to translate HTML directly into PDF now.
I've searched the web, and found a few converter. But all of them are written in C and can't be embeded directly into my Java code. And my servlet might not have rights to call an external program on the production machine.
I would appreciate very much if anyone can share their experience on similar issue, using a Java component to convert HTML into PDF. Suggestion of commercial products or open source freeware are all welcome.
Thank you very much.

HTML to PDF with Java, using OpenOffice.org - example here: [http://www.dancrintea.ro/html-to-pdf/|http://www.dancrintea.ro/html-to-pdf/]
You can use OpenOffice.org, running as a server and command it remotely for document convertion.
Besides HTML to PDF, there are also possible other convertions:
doc --> pdf, html, txt, rtf
xls --> pdf, html, csv
ppt --> pdf, swf
Code example:
import officetools.OfficeFile; // this is my tools package
FileInputStream fis = new FileInputStream(new File("c:/test.html"));
FileOutputStream fos = new FileOutputStream(new File("c:/test.pdf"));
// suppose OpenOffice.org runs on localhost, port 8100
OfficeFile f = new OfficeFile(fis,"localhost","8100", true);
f.convert(fos,"pdf");
-----------------------------------------------------------------------------------------------------------------------------------------

Similar Messages

  • Hola a todos , busco una manera de crear un pdf desde la impresora de ios, como lo puedo resolver, gracias. Hi all, I look for a way to create a PDF from the printer ios, as I can solve, thanks

    Hi all, I look for a way to create a PDF from the printer ios, as I can solve, thanks

    Try this process on your Mac. These files will be regenerated by Mac OS X with default settings.
    1. Quit the Mac App Store
    2. Trash the following folders and files; (~ is your Home folder)
    ~/Library/Caches/com.apple.appstore
    ~/Library/Caches/com.apple.storeagent
    ~/Library/Cookies/com.apple.appstore.plist
    ~/Library/Preferences/com.apple.appstore.plist
    ~/Library/Preferences/com.apple.storeagent.plist
    ~/Library/Preferences/com.apple.streagent.plist.lockfile
    Mac HD/Library/Preferences/SystemConfiguration/networkinterfaces.plist
    3. Restart your Mac
    4. Open the Mac App Store
    5. Log into your MAS account

  • Looking for an example from app gallery that uses WAAD for identity

    I'm looking for an example from the app gallery (http://azure.microsoft.com/en-us/gallery/active-directory/) that uses WAAD for identity. I need one the show our business what the process would look like for an organization signing up for a SaaS offering
    via the App Gallery. I know all the Microsoft applications use WAAD but I was hoping to find a third-party example.  What I mean is an app where all tenant and user identity is done using WAAD as opposed to federated identity.

    I doubt that what you are looking for exists yet.
    Cheers,
    Markus
    Markus Vilcinskas, Knowledge Engineer, Microsoft Corporation

  • Looking for a plt-file converter to pdf or dwg

    looking for a plt-file converter to pdf or dwg

    graphic converter used to do it.  you can check it out and try before you buy
    http://www.lemkesoft.de/en/products/
    -mvimp

  • I am looking for educational posters from Apple or for Garageband, if they exist. I'll be teaching a new class for middle school using Garageband next year. Thanks!

    I am looking for educational posters from Apple or for Garageband, if they exist. My school district will be teaching a new class for middle school using Garageband next year. I'd love to make the rooms look awesome! Can anyone hook me up? Thanks!

    lucky14life wrote:
    first i was wondering what everyone thinks about macbooks compared to let's say another pc like hp,dell,etc.... i have been told that i'd have to be dumb to get a machine with windows vista on it,so that is why i have turned my focus to a macbook because i have heard they are pretty good and worth it...
    I personally like my MacBook better than any other computer I have ever owned. I like being able to use windows when I need to but not being tied to it. My wife bought an HP with Vista and it doesn't seem to bad. Lots of updates at least one a week. Mostly graphic card drivers update.
    also is it true that if you upgrade let's say the memory,hard drive,etc it won't be covered in the warranty/apple care plan??
    Only two things you can upgrade on a MacBook is the Hard drive and Memory. It will not void the warranty. This is apples word on it. DIY Warranty Info
    I would just like to ask for people's opinions please on purchasing one of these i am currently a senior in college and will be using it next year for grad school,need to replace the one i currently have...
    Be sure you can live with the graphics. If you do a lot of graphics work you might want to consider the MacBook Pro. I use my MacBook for video editing using Final Cut Express HD and it works well. The MB is also not very good for gaming if you are into that. The integrated chip set doesn't work well with 3D games.
    also any other ideas on getting iwork or office, a hard plastic case or a skin,thanks alot for anyone's input it is greatly appreciated.... i am looking to get one once leopard comes out thanks!!
    Depending on your school may be a factor in what you choose. I use iWork and it is pretty good. You could also try NeoOffice or Open Office. They are good also. Office is supposed to be coming out with a new Mac version but not sure yet how it will work.
    Be sure to ask for the student discount when you purchase the computer and software. It adds up.

  • Looking for education materials of developing C++ application with Eclipse

    Hello everyone,
    I am looking for education materials of developing C++ application with Eclipse. Could anyone recommend some good education materials?
    Thanks in advance,
    George

    Thanks nereidahoxhaj,
    So this is funny...
    Hi George,
    i see from your history that you have never ever
    tried to help anybody... anyway i'll answer just to
    show you that the people in this forum are different!
    Download CTD plugin form eclipse site:
    http://www.eclipse.org/cdt/
    and then go to another forum...
    Addio!Your reply is very helpful. You are really different.
    regards,
    George

  • How can you save from photoshop to pdf with intact formlayers?

    How can you save from photoshop to pdf with intact formlayers?

    No, it is form layers for a cutting machine, when you save to pdf from ill or indesign you can select make acrobat layers but not in photoshop.
    Do anyone have a sullotion?

  • HT4400 I'm looking for a Braille note system that interacts with IPAD. This will be use in a classroom settings where you see both the braille & text communicated simultaneously.

    I'm looking for a Braille note system that interacts with IPAD. This will be use in a classroom settings where you see both the braille & text communicated simultaneously.

    This should be able to help ya out -> Support for wireless braille displays in iOS 6

  • I'm looking for a capture device that is compatible with Adobe Flash Media Live Encoder. I bought elgato but it is not compatible. Anyone know?

    I'm looking for a capture device that is compatible with Adobe Flash Media Live Encoder. I bought elgato but it is not compatible. Anyone know?

    This is just a shot in the dark....
    Do you have all your devices hooked up (and on) when you launch FMLE?  For example -- your camera or digitizer?  When FMLE launches it will try to launch with the last known settings... including input devices.  If it can't find these devices (they're not hooked up and on) it can crash, although in most situations it will simply show a default screen with default settings.
    If you do have your equipment hooked up (and on) when you launch FMLE, try unplugging them and then launching FMLE so that it opens up in default configuration mode (no input devices selected; all default settings).  Then uncheck the "preview" boxes for both your input and output preview windows.  Close FMLE and then plug in your equipment (and turn it on) and relaunch FMLE.  I offer this suggestion as FMLE can sometimes act funny when the preview windows are open with certain types of input devices.  Don't worry -- you don't have to keep the preview windows off forever.  If you can get FMLE to successfully launch with the preview windows off, then you can set your settings however you like and save the profile.  Then quit and relaunch FMLE and then turn the preview windows back on and see if it works.  If it does, great.  Just be aware that making any settings changes while the preview windows are open could result in FMLE crashing.   Again -- this only happens with some capture devices, such as certain Dazzle capture boxes.
    If none of this works, you could always try to upgrade to FMLE 3.2 and see if that solves your problem.

  • Just got an e mail to say that my Apple ID was just used to download photoshop touch for phone for 2.99 from the App Store with a receipt number. Is this a scam for me to give my Apple ID?

    Just got an e mail to say that my Apple ID was just used to download photoshop touch for phone for 2.99 from the App Store with a receipt number. Is this a scam for me to give my Apple ID?

    No but there's a link to reset your password. Etc etc..
    This is the email I got.
    "Your Apple ID was just used to download Photoshop Touch for phone £2.99 from the App Store on a computer or device that had not previously been associated with that Apple ID.
    If you initiated this download, you can disregard this email. It was only sent to alert you in case you did not initiate the download yourself.
    If you did not initiate this download, we recommend that you go to iforgot.apple.com to change your password, then see Apple ID: Tips for protecting the security of your account for further assistance.
    Regards,
    Apple"

  • I think pesimo customer service three days, I'm looking for someone I can ayudr activation problem with my CC and can not find anyone who can help me.

    I think pesimo customer service three days, I'm looking for someone I can ayudr activation problem with my CC and can not find anyone who can help me.

    Online Chat Now button near the bottom for Activation and Deactivation problems may help
    http://helpx.adobe.com/x-productkb/policy-pricing/activation-deactivation-products.html

  • I just recovered my serial number for Acrobat 8 from a chat session with Adobe.  How do I download Acrobat?  Version 8? Version XI?

    I just recovered my serial number for Acrobat 8 from a chat session with Adobe.  How do I download Acrobat?  Version 8? Version XI?

    Downloads available:
    Suites and Programs:  CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4 | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  12 | 11, 10 | 9, 8, 7
    Photoshop Elements:  12 | 11, 10 | 9,8,7
    Lightroom:  5.6| 5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.

  • Looking for a Fully Functional HTML 5 Audio Player that has a playlist capability

    Does anyone know how to build, find or purchase a full functioning HTML 5 Audio Player that has a playlist. I have found the small single mp3 player but I am looking for a full functioning Audio Player that can load and play several tracks from an album etc. I see beautiful HTML 5 Video players everywhere but it seems no one has figured out how to make an awesome Audio Player that plays multiple songs. Help

    You can try these :
    http://amazingaudioplayer.com/how-to-insert-an-html5-audio-player-to-your-webpage-with-ifr ame/
    http://www.musegrid.com/adobe-muse-widgets/audio-widget
    http://www.muse-themes.com/blogs/news/8285249-embedding-a-mobile-tablet-friendly-audio-pla yer
    Thanks,
    Sanjit

  • Look for my invoice from July 2010, bought in Washington DC

    I bought IPAD 1 , in Washington DC on July 2010,
    I need to look for the invoice, I paid around 650 US$ .

    You are not communicating with Apple when you post in these forums; we are all just fellow users. You will need to call the store from which you purchased the iPad and ask if they can provide a duplicate receipt. Whether they can provide a duplicate receipt three years after you made the purchase is doubtful, but you can ask.
    Regards.

  • Just put my i-tunes library on a 2nd hard drive, how do I easily change the location where the program looks for current songs from the C:/ drive to the new drive without going thru each song individually in the "get info" tab

    I just installed a new hard drive and transfered my i-tunes library to the new drive.  How can I make a bulk change of the location the program looks for the current songs.  I know you can do it song by song from the "get info" tab but I need to do it for all 4500 songs.  I have already changed the location that new files are stored to the new hard drive.

    The pop-up lets you connect to the library file, iTunes Library.itl, on the external drive. This will, in turn, automatically update the preference for the iTunes Media folder to be the iTunes Media or iTunes Music folder inside the iTunes folder on the external drive and it will update the locations of all the content inside the media folder so that it uses the version on the external drive.
    This works seamlessly if all iTunes content was inside the iTunes Media (or iTunes Music) folder (which was itself inside the iTunes library folder) before you moved/copied the iTunes folder. For content outside the iTunes Media folder iTunes should remain connected to the original location. These files should be consolidated (before or after the move/copy) and in addition, if available the library should be upgraded to the newer layout which places iPod Games and Mobile Applications inside the media folder instead of the library folder. (File > Library > Organize Library...)
    For split libraries there are methods to rejoin them before moving (preferred) or repairing after the fact (e.g. my script) which I can go into if needed.
    tt2

Maybe you are looking for