Dear all,
I am facing a big problem.I need help.
I want to make a software that can make the .pdf file from .doc file.
Is their anyone who can help me about this problem
Dear all,
I am facing a big problem.I need help.
I want to make a software that can make the .pdf file from .doc file.
Is their anyone who can help me about this problem
Quick summary and practical options (build or server): was right to mention Word automation and PDF libraries, but note a key distinction — libraries like iTextSharp are for creating PDFs programmatically, not for directly parsing legacy .doc files. For a faithful DOC -> PDF conversion you have three realistic paths: (A) use Microsoft Word via Interop/Export (desktop or one-off conversions), (B) use a server-capable converter (commercial .NET libraries such as Aspose/GemBox/Spire or a cloud API), or (C) use LibreOffice/OpenOffice in headless mode for batch/server conversions. If offers a ready tool, evaluate it carefully (test on sample docs, check license and source).
Example: VB.NET using Word Interop and ExportAsFixedFormat (works when Word is installed):
Imports Microsoft.Office.Interop
Sub ConvertDocToPdf(inputPath As String, outputPath As String)
Dim app As Word.Application = Nothing
Dim doc As Word.Document = Nothing
Try
app = New Word.Application()
app.Visible = False
doc = app.Documents.Open(inputPath, ReadOnly:=True, AddToRecentFiles:=False)
doc.ExportAsFixedFormat(outputPath,
Word.WdExportFormat.wdExportFormatPDF,
OpenAfterExport:=False,
OptimizeFor:=Word.WdExportOptimizeFor.wdExportOptimizeForPrint,
Range:=Word.WdExportRange.wdExportAllDocument)
Finally
If doc IsNot Nothing Then
doc.Close(False)
System.Runtime.InteropServices.Marshal.ReleaseComObject(doc)
doc = Nothing
End If
If app IsNot Nothing Then
app.Quit(False)
System.Runtime.InteropServices.Marshal.ReleaseComObject(app)
app = Nothing
End If
GC.Collect()
GC.WaitForPendingFinalizers()
End Try
End Sub If you need server/bulk conversion, run LibreOffice headless or buy a server-ready library. LibreOffice can be invoked from code (spawn soffice --headless --convert-to pdf) and is free; commercial libs handle edge cases and give support/licensing guarantees.
Troubleshooting and cautions: Microsoft does not recommend automating Office on unattended servers — it causes stability/permission problems, orphaned WINWORD.EXE processes, and scaling issues. If using Interop, always release COM objects and test with the same Word version installed on target machines. If conversion fidelity matters (complex formatting, embedded fonts, macros), prefer Word itself or a mature commercial engine.
Jump to Post— debasisdas 580Kindly post what you have tried sofar for reference of our experts
Kindly post what you have tried sofar for reference of our experts
To read the word doc you'll need to add a reference to the Microsoft Word Object Library to your project and create a word app object in your code to access the doc.
To create a pdf file you should try iTextSharp. It can be downloaded here http://sourceforge.net/projects/itextsharp/ you'll need to do a little studying of iTextSharp so here is a tutorial
I use iTextSharp all of the time, it works great.
hey! i have a software based on this type of conversion. if u want it then contact to me on , havig description where can i mail it with ur contacts ...........
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.