Convert .txt file to .pdf using java code

Hi,
My requirement is to read the .txt file and convert it into .pdf file after changing certain text.
Searched the net got a document on iText ..is it the only way for conversion or any other method....please help.
Thanks in advance.
Pooja

Hi.
You could review this [url|http://www.roseindia.net/java/java-conversion/TextToPDF.shtml].
It is a good example to use the iText Library.
The other option could be [PDFBox|http://pdfbox.apache.org/].
Here some [example code|http://pdfbox.apache.org/userguide/cookbook/creation.html#HelloWorld].
Another option, but more complicated is [Apache FOP|http://xmlgraphics.apache.org/fop/].
I hope you can find the right solution.
Kindest regards, have a great day

Similar Messages

  • Convert txt file to pdf using Acrobat Distiller

    Hi,
    We purchase years ago Distiller 8.1.0.
    Now, I try to convert txt file to pdf files, but I always get an error.
    Please Help,
    Hezi

    I have important information: Acrobat is not licensed for use server side, so you must not use it to build that solution, even if it is technically possible.
    Adobe's server side PDF creation product is LiveCycle PDF Generator https://www.adobe.com/sea/products/server/pdfgenerator/
    This comes in three editions. The "PostScript" edition is little more than a server-side version of Distiller, and will not convert TXT. However, the other two editions can convert a wide variety of formats.

  • Not able to convert word file to PDF using Adobe Acrobat 9 Standard

    Hi,
    I am not able to convert word file to PDF using Adobe Acrobat 9 Standard. When I try to convert, it starts the process and in between I am getting this prompt, as shown in figure below and the conversion process stops. The PDF is not created.
    Note: The filename 'Acr85.doc' in the above prompt keeps changing and is random.
    I tried clicking Yes, No and Cancel on the above prompt, but the conversion process just stops and PDF is not getting generated.
    I am able to create PDFs from web pages. No issues with that. Not working only with Word.
    Can someone help me with this.
    Thanks,
    Vinay Jaassiel Kankipati
    Technical Writer

    In MSWord please changes the settings as "Adobe PDF" menu => "Change Conversion Settings" goto Tab Bookmark and clicks the option Convert Word Bookmarks. Now you convert the Doc to PDF you can achieve the Bookmark.
    Hope this help you
    Sudhakar

  • Idea  about convert word document to pdf using java api

    idea about convert word document to pdf using java api if any one find it mail me at [email protected]

    api if any one find it mail me at
    [email protected]
    What happend to your other mailID :
    [email protected] ????
    http://forum.java.sun.com/thread.jspa?threadID=639851&
    messageID=3756910It received the Spam Of Death. RIP

  • How to write excel file (.xlsx) using file adapter without using java code

    Hi All,
    In soa suite 11g Is there any ways to write the data to the excel ( xlsx ) file using fileadapter and not using java code..Thanks in Advance

    Hi Siva,
    I don't think there is any way to write .xls file directly. You'll have to use some Java API (iText etc.) to create an .xls file. However, you can write .csv file that can be easily converted into .xls at the target end. In MS, it opens as Excel file if delimiter is comma *,*.
    Regards,
    Neeraj Sehgal

  • Convert XML file into DTD using Java

    Hi All,
    I want to do convert the xml file into DTD using Java.
    I read the DOM package but didnt get clear idea.
    Anyone of you have an idea please share the coding with me.
    Any suggestions greatly appreciated.
    Thanks
    Veera

    Hi All,
    I want to do convert the xml file into DTD using Java.
    I read the DOM package but didnt get clear idea.
    Anyone of you have an idea please share the coding with me.
    Any suggestions greatly appreciated.
    Thanks
    Veera

  • How to convert from xml file to html using java code

    How to convert from xml file to html file using java code

    Get yourself Apache Xalan or Saxon or some XSLT processor
    String styleSheet = "/YourXSLTStylesheet.xsl";
    String dataSource = "/YourXMLDocument.xml";
    InputStream stylesheetSource = TransformMe.class.getResourceAsStream(styleSheet);
    InputStream dataSourceStream = TransformMe.class.getResourceAsStream(dataSource);
    OutputStream transformedOut = new FileOutputStream("filename.html");
    TransformerFactory tFactory = TransformerFactory.newInstance();
    Transformer transformer = tFactory.newTransformer(new StreamSource(stylesheetSource));
    transformer.transform(new StreamSource(dataSourceStream), new StreamResult(transformedOut));You'll also need to learn XSLT if you don't already know that. Here's a good place to start
    http://www.w3schools.com/xsl/

  • Converting a file to pdf using API

    I am using APIs for converting a word document into pdf file. I added 2 jar files adobe-convertpdf-client and adobe-generatepdf-client in my application and tried to convert a word document into pdf format. For this requirement should i have install livecycle, application server, Database etc. Can it be done using a java console application by using these jar files. If so Can anyone give me a sample code?

    Since cfdocument can render HTML, you may easily convert JPG
    to PDF, using
    <cfdocument format="PDF">
    <img src="myphoto.jpg" alt="my photo">
    </cfdocument>
    However, converting DOC to PDF or PPT to PDF with Coldfusion
    is not currently possible. DOC and PPT have proprietary MS Office
    formatting that is foreign to Coldfusion.

  • How to convert xml file to xsl using java

    Hi all,
    I have an XML file with which i need to convert(transform) it to an xsl file using java.
    I am new to converting xml file to xslt.Please send me if u have code .
    Thanks in advance
    regards
    Ram

    You seem to be asking the wrong question. An XSL file can be used to transform an XML file, but transforming an XML into an XSL does not make sense. The API for running XSL transforms on the Java platform is described here:
    http://java.sun.com/javase/6/docs/api/javax/xml/transform/package-summary.html

  • Converting excel file to PDF using Adobe 9 standard on windows XP

    I have installed office 2010 SP1 on a computer and it already has adobe 9 installed. user never had problem with converting multi sheet excel workbook to PDF using MSoffice 2003.
    Now, when we open excel files in EXCEL 2010 then try to print it to adobe 9, it asks for a filename and we type a name and it convert the first 2 sheet and then it asks again for the other filename and if we enter other name it print other sheets into second file. so basically it splits to 2 PDF files for no reason.
    I tested same file on my laptop with windows 7 and adobe standard 9 and office 2010  and i got same result.
    anybody knows what is the issue?

    Have you updated Acrobat? Have you tried printing to another file format just to see if it is an issue with Acrobat or OFFICE 2010. OFFICE 2010 has forced many folks to upgrade to AA X to obtain compatibility.

  • Converting Doc files to PDF using command line ?

    Hello,
    I need to automate the process of converting (in command line) word files to pdf.
    Is Acrobat distiller Server the right product ? or is there another product from Adobe that would allow me to reach this goal ?
    NB : currently using pdfcreator in command line but have some stability problems now...
    thanks a lot
    Florent

    Acrobat Distiller Server can only convert Postscript to PDF. You may look at this product:
    http://www.adobe.com/products/livecycle/pdfgenerator/

  • Problems with some photos when converting Publisher files to PDF using Acrobat 9

    I tried to make a pdf of a publisher document that has a number of photographs. Two of the photographs appear grey with streaks -looks like some of the colours are not converting properly. The same document works fine with Acrobat 8 but not with version 9. Anybody have this experience?

    Graffit's suggestion did not work for me.
    I work for the Ontario government, and we are still using Office 2003. I am not sure what version of 9 we are using as we get bulk licences to use the program. I only got the program in August 2010. I used the default settings in the program.
    I try to open the publisher document in Adobe. I have also tried opening the publisher document, then converting it to the PDF. Both have two of the photos that don't convert properly. The other photos are fine.
    The two photos in question were given to us by the Communications department. I don't have the originals. The photos were copied from other document. I don't know what the format of the orginal photos were. The person in Communications has not responded to my request yet.

  • Missing page while converting Postscript files to PDF using Distiller 9.

    Hi
    Due to some incorrect hexadecimal code in the post script, one of the pages is not getting created in the full pdf. So, we can say that the page is missing in the complete pdf file.
    Here is my snapshot of the issue:
    1. Offending command issue on a particular post script data is coming up due to some incorrect hexadecimal data.
    2. If I run the postscript through Distiller 8, report is getting generated without any missing data.
    3. Whereas, if I run it throught Distiller 9.1.3, Distiller is ignoring the page due to following warning.
    %%[ Error: typecheck; OffendingCommand: xshow ]%%
    Stack:
    41
    ( À
    4. If I run the same Postscript file in Distiller 9.3 (latest version), issue is going away.
    5. But I have another Report pdf with the same  issue but this time with a different hexadecimal exception.
    %%[ Error: typecheck; OffendingCommand: xshow ]%%
    Stack:
    49
    (à ø&#127;À ø&#127;À øÿ€ üÿ€ üÿ€ üÿ€ üÿ€ þÿ€ þÿ€ þÿ€ þÿÀ þ&#127;À þ&#127;à þ&#127;ø?þ?ÿÿþ?ÿÿþ ÿÿþ ÿÿþ ÿýþ ÿùþ?ð&#127;à ø&#127;À ø&#127;À øÿ€ üÿ€ üÿ€ üÿ€ üÿ€ þÿ€ þÿ€ þÿ€ þÿÀ þ&#127;À þ&#127;à þ&#127;ø?þ?ÿÿþ?ÿÿþ ÿÿþ ÿÿþ ÿýþ ÿùþ ü%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    So, either way, even if I upgrade my version of Acrobat from 9.1.3 to 9.3, issue doesnt go away. I think the new Acrobat Distiller is buggy and introducing new problems when compared to Acrobat Distiller 9.
    1. Works fine Distiller 8.0
    2. More problems with 9.1.3
    3. Lesser problems with 9.3 but I cant upgrade to 9.3 unless i see all the missing page problem going away.
    Can someone urgently look into this?
    Regards
    Hari

    I am calling Distiller using command line.
    "C:\Program Files\Adobe\Acrobat 9.0\Acrobat\Acrodist.exe" /f/Q/N C:\Reporter\debug\report.dst
    report.dst contains the the names of the post script files.
    (I have already contacted Distiller server forum and I was told to post the request in Acrobat forum)

  • Converting .doc file to PDF using Word 2008 - does not convert as is..

    I am trying to convert a .doc file (Word 2008) to a PDF file.  I have tried using the save as function and the print function.  Both will work however everytime 2 things happen:
    1.  The PDF file splits into 2 files (the document is 20 pages long)
    2.  In one area of text, two words are overlapped (in the PDF version) but are not overlapped in the .doc version.
    How do I convert the .doc to a PDF with out these two items occuring?
    Thanks in advance for your help
    T.

    I do not think this is an app but rather a function of MS-Word, the very function that does not work with high fidelity on Mac.  Any document of substance (greater than 10,000 words, imbedded images, figures, tables, or high formatting) will not convert accurately to PDF on Macbook Pro. 
    Using newest MS Office with updated service pacs, and experienced users. This is a puzzling incompetency on the Apple team's side. And there have been no fixes.  One could argue this is a MS problem since the software is theirs.  Probably true, but the problem occurs on Mac platforms, not PC platforms.  Apple can drive improvements.  Not sure Apple customers can.

  • Convert a file to PDF using Acrobat

    This question was posted in response to the following article: http://help.adobe.com/en_US/acrobat/pro/using/WS58a04a822e3e50102bd615109794195ff-7f73.w.h tml

    I am not that familiar with AutoCAD, but depending on the version of AutoCAD and Acrobat you may be able to create the files from Acrobat. However, you would need to have the PDF Maker plugin functional in AutoCAD and I think this may be version dependent. For those that can help with that info, you need to provide info on your OS and the versions (& subversions) of both AutoCAD and Acrobat. I have no idea what 1 year subscription you are talking about. Acrobat is a purchase item for several hundred $$.
    In terms of who is here, it is a user forum and only occasionally do Adobe emplyees drop by. This is not the place to ask questions of Adobe, but to questions that other users can answer. So again you need to provide the info on what you are working with and maybe we can help. If you have Acrobat, you can always simply print to the Adobe PDF printer.

Maybe you are looking for

  • .eml files

    Hi, does any body know how to write .eml (to read them with outlook express) files. Can JavaMail do this? I'm developing a webmail application and I need to generate .eml files to export mails to outlook express. thanks, dani.

  • Rolling Credits freezing up Motion

    Hey Guys, Just purchased Motion to try to just do a simple credit roll. The whole credits should take about 70 seconds. I'm attempting to use the Scroll Up Text Animation to scroll them from bottom to top. When I enter the text after about ten credit

  • How can I put a background image into the cell of a table using Dreamweaver CC.

    I want to place an image in a table cell and then be able to place editable HTML in the same cell on top of image. I also have Dreamweaver CS6. I can't get either one to do it using solution I found searching on web. Please help ASAP. What am I doing

  • Microsoft SQL 2008

    I'm trying to connect to Microsoft SQL 2008. I'm using "sqljdbc_1.2 driver". I'm having trouble getting the right "jdbc driver" and "jdbc url". For jdbc url, I tried: "jdbc:sqlserver://localhost" but there was errors. run-single: java.lang.ClassNotFo

  • How to spot app updates on Ovi ?

    So i've downloaded some apps on my N8 from the Ovi Store. Some of them will get updates soon. How can i spot them ?! There is no such thing  as an update-manager on Ovi.