.DOC to .PDF conversion with the format maintainence
Hi,
My requirement is to convert the exact text witht he formating in the .DOC file to PDF file.
I have done this using POI and IText ar files but I am unable to maintain the formating , tried and search the net but unable to find the solution.
Please help me in solving this issue.
Thanks in advance.
Pooja
Can you please tell me how did you solve this?
Cheers,
Kunjal
Similar Messages
-
Doc to PDF conversion failed for Acrobat 9 on IIS7/win 2008 system
I wanted to convert a doc to PDF. But getting error when PDF distiller initialized.
Error : 006~ASP 0177~Server.CreateObject Failed~80080005
at statement : Set Obj = server.CreateObject("PdfDistiller.PdfDistiller.1")
This is done is classic ASP.
This works perfectly fine on IIS6/win 2003 with Acrobat 5 . but getting error on production server where IIS7/win 2008,Acrobat 9 is installed.
I have added all the necessary permissions.
What could be the problem?
Any help would be appriciated.But the same thing is working fine for Acrobat distiller 5 on IIS 6 and Win 2003.
With Acrobat 5,printer installed is called Acrobat Distiller and with Acrobat 9, printer installed is called Adobe PDF. This should not affect the distiller functionality/execution I think.
Manual Doc to PDF conversion works, means if document is passed to Adobe PDf it converts the doc to PDF.
Somehow automation is not working failing at statement
Set oDistiller = CreateObject("PDFDistiller.PDFDistiller.1")
Could there be case that Acrobat 9 doesn't support automation or need license or so? -
Writing a java program for generating .pdf file with the data of MS-Excel .
Hi all,
My object is write a java program so tht...it'll generate the .pdf file after retriving the data from MS-Excel file.
I used POI HSSF to read the data from MS-Excel and used iText to generate .pdf file:
My Program is:
* Created on Apr 13, 2005
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
package forums;
import java.io.*;
import java.awt.Color;
import com.lowagie.text.*;
import com.lowagie.text.pdf.*;
import com.lowagie.text.Font.*;
import com.lowagie.text.pdf.MultiColumnText;
import com.lowagie.text.Phrase.*;
import net.sf.hibernate.mapping.Array;
import org.apache.poi.hssf.*;
import org.apache.poi.poifs.filesystem.*;
import org.apache.poi.hssf.usermodel.*;
import com.lowagie.text.Phrase.*;
import java.util.Iterator;
* Generates a simple 'Hello World' PDF file.
* @author blowagie
public class pdfgenerator {
* Generates a PDF file with the text 'Hello World'
* @param args no arguments needed here
public static void main(String[] args) {
System.out.println("Hello World");
Rectangle pageSize = new Rectangle(916, 1592);
pageSize.setBackgroundColor(new java.awt.Color(0xFF, 0xFF, 0xDE));
// step 1: creation of a document-object
//Document document = new Document(pageSize);
Document document = new Document(pageSize, 132, 164, 108, 108);
try {
// step 2:
// we create a writer that listens to the document
// and directs a PDF-stream to a file
PdfWriter writer =PdfWriter.getInstance(document,new FileOutputStream("c:\\weeklystatus.pdf"));
writer.setEncryption(PdfWriter.STRENGTH128BITS, "Hello", "World", PdfWriter.AllowCopy | PdfWriter.AllowPrinting);
// step 3: we open the document
document.open();
Paragraph paragraph = new Paragraph("",new Font(Font.TIMES_ROMAN, 13, Font.BOLDITALIC, new Color(0, 0, 255)));
POIFSFileSystem pofilesystem=new POIFSFileSystem(new FileInputStream("D:\\ESM\\plans\\weekly report(31-01..04-02).xls"));
HSSFWorkbook hbook=new HSSFWorkbook(pofilesystem);
HSSFSheet hsheet=hbook.getSheetAt(0);//.createSheet();
Iterator rows = hsheet.rowIterator();
while( rows.hasNext() ) {
Phrase phrase=new Phrase();
HSSFRow row = (HSSFRow) rows.next();
//System.out.println( "Row #" + row.getRowNum());
// Iterate over each cell in the row and print out the cell's content
Iterator cells = row.cellIterator();
while( cells.hasNext() ) {
HSSFCell cell = (HSSFCell) cells.next();
//System.out.println( "Cell #" + cell.getCellNum() );
switch ( cell.getCellType() ) {
case HSSFCell.CELL_TYPE_STRING:
String stringcell=cell.getStringCellValue ()+" ";
writer.setSpaceCharRatio(PdfWriter.NO_SPACE_CHAR_RATIO);
phrase.add(stringcell);
// document.add(new Phrase(string));
System.out.print( cell.getStringCellValue () );
break;
case HSSFCell.CELL_TYPE_FORMULA:
String stringdate=cell.getCellFormula()+" ";
writer.setSpaceCharRatio(PdfWriter.NO_SPACE_CHAR_RATIO);
phrase.add(stringdate);
System.out.print( cell.getCellFormula() );
break;
case HSSFCell.CELL_TYPE_NUMERIC:
String string=String.valueOf(cell.getNumericCellValue())+" ";
writer.setSpaceCharRatio(PdfWriter.NO_SPACE_CHAR_RATIO);
phrase.add(string);
System.out.print( cell.getNumericCellValue() );
break;
default:
//System.out.println( "unsuported sell type" );
break;
document.add(new Paragraph(phrase));
document.add(new Paragraph("\n \n \n"));
// step 4: we add a paragraph to the document
} catch (DocumentException de) {
System.err.println(de.getMessage());
} catch (IOException ioe) {
System.err.println(ioe.getMessage());
// step 5: we close the document
document.close();
My Input from MS-Excel file is:
Planning and Tracking Template for Interns
Name of the Intern N.Kesavulu Reddy
Project Name Enterprise Sales and Marketing
Description Estimated Effort in Hrs Planned/Replanned Actual Actual Effort in Hrs Complexity Priority LOC written new & modified % work completion Status Rework Remarks
S.No Start Date End Date Start Date End Date
1 setup the configuration 31/01/2005 1/2/2005 31/01/2005 1/2/2005
2 Deploying an application through Tapestry, Spring, Hibernate 2/2/2005 2/2/2005 2/2/2005 2/2/2005
3 Gone through Componentization and Cxprice application 3/2/2005 3/2/2005 3/2/2005 3/2/2005
4 Attend the sessions(tapestry,spring, hibernate), QBA 4/2/2005 4/2/2005 4/2/2005 4/2/2005
The o/p I'm gettint in .pdf file is:
Planning and Tracking Template for Interns
N.Kesavulu Reddy Name of the Intern
Enterprise Sales and Marketing Project Name
Remarks Rework Status % work completion LOC written new & modified Priority
Complexity Actual Effort in Hrs Actual Planned/Replanned Estimated Effort in Hrs Description
End Date Start Date End Date Start Date S.No
38354.0 31/01/2005 38354.0 31/01/2005 setup the configuration 1.0
38385.0 38385.0 38385.0 38385.0 Deploying an application through Tapestry, Spring, Hibernate
2.0
38413.0 38413.0 38413.0 38413.0 Gone through Componentization and Cxprice application
3.0
38444.0 38444.0 38444.0 38444.0 Attend the sessions(tapestry,spring, hibernate), QBA 4.0
The issues i'm facing are:
When it is reading a row from MS-Excel it is writing to the .pdf file from last cell to first cell.( 2 cell in 1 place, 1 cell in 2 place like if the row has two cells with data as : Name of the Intern: Kesavulu Reddy then it is writing to the .pdf file as Kesavulu Reddy Name of Intern)
and the second issue is:
It is not recognizing the date format..it is recognizing the date in first row only......
Plz Tell me wht is the solution for this...
Regards
[email protected]Don't double post your question:
http://forum.java.sun.com/thread.jspa?threadID=617605&messageID=3450899#3450899
/Kaj -
Perform as pdf form with the ability to insert pictures
How to perform as pdf form. with the ability to insert pictures?
You want your users to be able to insert images into a PDF form? That is only possible if they're either using Acrobat, or if they're using the latest version of Reader (XI) and the image is in PDF format.
-
PDF conversion with PDF2ID; Hypertext not working when exported back to pdf.
I have done a PDF conversion with PDF2ID, however Hypertext is not working when I exported it back to pdf. I am using the PDF2ID plug-in program to redo all the product booklets for our company as the hypertext did not work when downloaded to any smart phone. All that appeared were blank placeholders in each booklet index page.
According to the PDF2ID people the program plug-in recovers all URLs static and dynamic and bookmarks and local links and suggested I check with Adobe ID5 for help, but Adobe says my $1,000 ID5 is no longer supported and that I should go to the forums.....so here I am.
This is the first time I've even opened my ID5, so I'm a bit lost. Now I need to improve the quality of the PDFs, as we also need to convert all images to TIFF-CMYK in order to have the booklets printed & bound professionally. they tell me ID can do that.
Any help is greatly appreciated.
DavidDaveorne wrote:
they tell me ID can do that.
Ugh...in some companies, that is training.
Don't take this the wrong way David, but of course ID can't do anything. PDF2ID conversions can be sketchy in the hands of the experienced. The same can be said of properly preparing matials for print. As Bob has already alluded, you're in an unfair position there. It's not uncommon for "management" types to just throw some sophisticated tools at a need and expect someone to make it work. In order to do what's being asked of you, you'll have to learn a fair bit about InDesign and production. It's too soon to ask about the output when you haven't learned to manage the input. -
Can we Compare PDF Output with CSV format
Team,
Can we Compare PDF Output with CSV format.
In Excel I need to two text boxes asking us to browse the files and compare the files PDF & CSV format.
Please suggest me if we have solution for this.
Thanks!
KiranHi
I'm afraid the Excel Application does not support this function currently, I am suggesting you to take advantage of a third party component to achieve this goal.
Thanks for your understanding.
Best Regards
Lan
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
How do you remove an old conversation using the Beta iMessage on an iMac. When I open a new conversation with the same person the old conversation comes back
Hi,
Previously iChat had tried a Last Chat/IM option when using Saved Transcripts - which itself was an option.
iChat has also tried "Saving" the Last Chat by leaving a Chat window open and using something similar to the Lion method of showing an app in the state is was closed in.
In Messages the option to Save Transcripts has been removed and Chats or all types are saved as a matter of course.
What this tends to mean for your iChat style Buddy Chats is that it opens all the Transcripts for that buddy as a sort of History you can scroll back through if you want (I have some Buddies with saved chats gong back to 2004)
With the Syncing of iMessages with iPhones and iPads (or Touches) then it seems this works slightly differently.
Although you can delete the chat and the contents of the Chat as separate action it is true that in the Beta as soon as you connect to the same Contact that the contents of the previous chats are shown to you.
I have found that Messages stores a data base of info on iMessages in Your Home Folder/Library/Messages
I have found that deleting this chat-db removes the "History" that keep popping up.
By default the Saved "iChats" are also stored in the Home Folder/Documents/iChats (At least this is the default place iChat used and they go to the same iChats folder where ever you had it)
Some people claim removing iMessages saved here stops the "History" reappearing.
In Lion the only access to the Home Folder/Library is via the Finder's Go Menu and hiding down the ALT key
10:00 PM Sunday; June 10, 2012
Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
iMac 2.5Ghz 5i 2011 (Lion 10.7.4)
G4/1GhzDual MDD (Leopard 10.5.8)
MacBookPro 2Gb (Snow Leopard 10.6.8)
Mac OS X (10.7.4),
"Limit the Logs to the Bits above Binary Images." No, Seriously -
I have a pdf file with the added sounds, so I can not run the sound in adobe reader XI on my tablet samsung galaxi pro (android)
Thanks for writing to us. Unfortunately, such advanced javascript support is currently not provided by Adobe Reader for Android.
Thanks,
Adobe Reader Team -
Is there a way to "stamp" PDF files with the purchaser's email address?
I would like to sell PDF reports and/or eBooks via BC, but I would like to be able to stamp each such PDF/eBook with the purchaser's email address.
There are certainly stand-alone PDF stamper programs and some providers like gumroad.com already offer that feature.
Anyone actually done it with BC, please?
Thanks in advance
AndyThanks for the rapid response, Liam -- even if it's not the response I was hoping for.
-
Can anybody help me with comparing the two pdf files with the help of QTP.I have Adobe Acrobat installed on my system and i have access to the API.
Thanks,
Varun SainiI want to find out more about QTP and API. Maybe that is what I want to compare two mechanical drawings for differences between them. (see “More than one pdf file in one window”. Is that what you are looking to do? 9Not necessarily mechanical drawings but some other pdf).
-
Opening 2 PDF's with the same file name
I have someone who has difficulty opening two PDF's with the same file name. They had a file open, then try to open another PDF document with the same file name as the original document, however it will not open (and no error displays) and reverts back to the "old" document. Any ideas?
Are this diferent documents? What version of Adobe Reader?
-
I just paid for this and it wont download on my laptop because it is not compatible with the format can adobe give me a different version or not?
And what exactly? you have not provided any system information or otehr useful technical details, so we can't know what is going on.
Mylenium -
To function with the format VTR. Can anyone help?
ok i have final cut pro but i use a dvd recorder to record all of my shows and I was trying to figure out if Final cut Pro has a way to function with the format VTR. Can anyone help?
If you want to record directly to the DVD recorder, you'll most likely find that most DVD recorders with a Firewire input will NOT record directly from your Mac. I'm only aware of a couple of models (long since discontinued) that would allow it. So what you have to do it to connect your Mac via Fireiwre to a digital-to-analog converter (most any DV camcorder, VTR or DV converter box), then connect the converting device to your DVD recorder using the analog connections.
If you want to capture from the DVD recorder (hard drive or disc), you can usually do that via Firewire directly to your Mac: in FCP, set Device Control to "Non-Controllable Device" and use Capture Now. Do not expect FCP to control the DVD recorder like it can with camcorders and VTRs.
-DH -
When I i port a word doc into pages it throws the format out and I cant adjust it?
when I i port a word doc into pages it throws the format out and I cant adjust it?
Pease don't say the "latest" that doesn't tell us anything.
People are always getting it wrong.
Tell us the actual version number:
Menu > Pages > About Pages
Can you select the footer? And what is in the footer?
Sometimes Word has these things in separte textboxes under other things and you need to lassoo them to get rid of them.
Peter -
When converting Word doc to pdf I lose the table boarder. How to fix?
I have Adobe Acrobat Pro X. When converting an MS Word doc to pdf I lose the table boarders - primarily in shaded boxes that also have navigation tags. Can someone let me know how to fix this problem?
Hi Garyeg -
Thanks you for reporting the issue.
We would need the files for investigation. Request you to share your email id for correspondence.
In addition please share which version of Acrobat are you using i.e. 10.X?
Regard’s ,
Reetika
Maybe you are looking for
-
This is the first time that this happens and im very confused because it also doesnt show that the ipod is charging either. And ive tried different wires and they all did the same so i know thats not the problem.
-
If you want to set up a iphone plan in store, what are the documents you need ?
when doing a instore setup what are the required things needed. Say this is your first iphone ?
-
Item not relevant for billing-Batch Split
Dear all Item is not relevant for billing for Batch Split item. i have checked item category, item category determination and copy control. The scenario is working fine for local and export but for deemed export the item is not relevant for billing P
-
PPT Presentation error when importing
We have been getting an error "Could not open PPT file" for several PPT files when importing into Captivate 2. These files import into Captivate 1.0 perfectly. Also, for the few files we can get to import, all of the slides don't import. It usually i
-
How do i update my iPad 1 to iOS 6.0 when it says my iPad is already updated/
I want to bpdate my ipad to iOS 6.0 but when i go to Setting,General,system update, it says my system is fully updated when i only have iOS 5.1.1. how do i get iOS 6.0?