[Show all top banners]

kundalay
Replies to this thread:

More by kundalay
What people are reading
Subscribers
:: Subscribe
Back to: Kurakani General Refresh page to view new replies
 Changing Word document to pdf format
[VIEWED 4845 TIMES]
SAVE! for ease of future access.
Posted on 08-09-06 8:12 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

i got an assignment early this morning on changing word document into pdf format, so that it can be opened by adobe reader.

help me guys. i already told my supervisor that i know this stuff.
 
Posted on 08-09-06 8:17 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

try these solutions

http://www.pdfonline.com/
http://www.fastpdf.com/
http://www.primopdf.com/

there are hundreds of solutions out there
 
Posted on 08-09-06 9:14 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

In appreciation for your help CYBERDUDE.
thanks man, and this is all i can give you right now.

 
Posted on 08-09-06 10:28 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

This is the easiest job you can do. Use the VBS Code to do the job. Do you already have adobe acrobat distiller, you need it to do the job or it is little twisted.

Here is the code that someone already wrote

'************************************************


' Constants
Const WdPrintAllDocument = 0
Const WdDoNotSaveChanges = 0

' Global variables
Dim arguments
Set arguments = WScript.Arguments

' ***********************************************
' ECHOLOGO
'
' Outputs the logo information.
'
Function EchoLogo()
If Not (arguments.Named.Exists("nologo") Or arguments.Named.Exists("n")) Then
WScript.Echo "doc2pdf Version 1.0, Michael Suodenjoki 2003"
WScript.Echo "=================================================="
WScript.Echo ""
End If
End Function

' ***********************************************
' ECHOUSAGE
'
' Outputs the usage information.
'
Function EchoUsage()
If arguments.Count=0 Or arguments.Named.Exists("help") or
arguments.Named.Exists("h")
Then
WScript.Echo "Generates a PDF file from a Word document using Adobe Distiller."
WScript.Echo ""
WScript.Echo "Usage: doc2pdf.vbs [/o:]"
WScript.Echo ""
WScript.Echo "Available Options:"
WScript.Echo ""
WScript.Echo " /nologo - Specifies that the logo shouldn't be displayed"
WScript.Echo " /help - Specifies that this usage/help information should " +
"be displayed."
WScript.Echo " /debug - Specifies that debug output should be displayed."
WScript.Echo ""
WScript.Echo "Parameters:"
WScript.Echo ""
WScript.Echo " /o: Optionally specification of output file (PDF)."
WScript.Echo " generate. E.g. dcdhelpconfig.xml"
WScript.Echo ""
End If
End Function

' ***********************************************
' CHECKARGS
'
' Makes some preliminary checks of the arguments.
' Quits the application is any problem is found.
'
Function CheckArgs()
' Check that is specified
If arguments.Unnamed.Count <> 1 Then
WScript.Echo "Error: Obligatory parameter missing!"
WScript.Quit 1
End If

bShowDebug = arguments.Named.Exists("debug") Or arguments.Named.Exists("d")

End Function


' ***********************************************
' DOC2PDF
'
' Converts a Word document to PDF using Adobe
' Distiller.
'
' Input:
' sDocFile - Full path to Word document.
' sPDFFile - Optional full path to output file.
'
' If not specified the output PDF file
' will be the same as the sDocFile except
' file extension will be .pdf.
'
Function DOC2PDF( sDocFile, sPDFFile )

Dim fso ' As FileSystemObject
Dim wdo ' As Word.Application
Dim wdoc ' As Word.Document
Dim wdocs ' As Word.Documents
Dim sPrevPrinter ' As String
Dim oDistiller ' As PDFDistiller.PDFDistiller.1

Set oDistiller = CreateObject("PDFDistiller.PDFDistiller.1")
If oDistiller Is Nothing Then
WScript.Echo "Error: Cannot create PDF document. Adobe Acrobat " +
"Distiller is not available! Quiting..."
WScript.Quit 1
End If

Set fso = CreateObject("Scripting.FileSystemObject")
Set wdo = CreateObject("Word.Application")
Set wdocs = wdo.Documents

sTempFile = fso.GetSpecialFolder(TemporaryFolder) + "\" + fso.GetTempName()

sDocFile = fso.GetAbsolutePathName(sDocFile)

' Debug outputs...
If bShowDebug Then
WScript.Echo "Doc file = '" + sDocFile + "'"
WScript.Echo "Temporary file = '" + sTempFile + "'"
WScript.Echo "PDF file = '" + sPDFFile + "'"
End If

sFolder = fso.GetParentFolderName(sDocFile)

If Len(sPDFFile)=0 Then
sPDFFile = fso.GetBaseName(sDocFile) + ".pdf"
End If

If Len(fso.GetParentFolderName(sPDFFile))=0 Then
sPDFFile = sFolder + "\" + sPDFFile
End If

' Remember current active printer
sPrevPrinter = wdo.ActivePrinter

'wdo.ActivePrinter = "Acrobat PDFWriter"
wdo.ActivePrinter = "Acrobat Distiller"

' Open the Word document
Set wdoc = wdocs.Open(sDocFile)

' Print the Word document to the Acrobat Distiller -
' will generate a postscript (.ps) (temporary) file
wdo.ActiveDocument.PrintOut False , , , sTempFile

' This outcommented part was used while trying to use "Acrobat PDFWriter"
'Do While wdo.BackgroundPrintingStatus > 0
' 'Do nothing - just wait for printing to finish before closing Word
'Loop

wdoc.Close WdDoNotSaveChanges
wdo.ActivePrinter = sPrevPrinter
wdo.Quit WdDoNotSaveChanges
Set wdo = Nothing

' Debug output...
'If bShowDebug Then
WScript.Echo " Distilling to '" + sPDFFile + "'"
'End If

' Distill the postscript file to PDF
oDistiller.FileToPDF sTempFile, sPDFFile, "Print"
Set oDistiller = Nothing

' Delete the temporary postscript file...
fso.DeleteFile( sTempFile )

Set fso = Nothing

End Function

' *** MAIN **************************************

Call EchoLogo()
Call EchoUsage()
Call CheckArgs()
Call DOC2PDF( arguments.Unnamed.Item(0), arguments.Named.Item("o") )

Set arguments = Nothing



You can do the same job using ghostscript (without Distiller). Learn it.
 
Posted on 08-09-06 10:36 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

maf pau gajedi dai, galti bho, aba dekhi ma question gardina. mero sano dimag ma yesto solution rakhne thau nai chaina. my brain is full of corona, chicken and guls................

HAMI DHERAI SANA CHAU,
HAMRO DIMAG SANO CHA,
YO SANO DIMAG MA 1.4 MB MATRA THAU CHA
 
Posted on 08-09-06 10:42 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Dude why would you want to reinvent the wheel ?

The man just wants to convert is doc to pdf and you are asking him to program.

I could have given him my C# code but he does not want that.
 
Posted on 08-09-06 1:06 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

buy and install Adobe pdf maker software.. why bothering about writing codes?
 
Posted on 08-09-06 1:15 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

thanks to you guys, the site that cyberdude gave me worked fine, but the back ground logo didn't showed up in pdf, but anyway my supervisor looks ok with it.

and please share the chicken and chorona. i dont know what you guys gona do with the girl. 3 vs 1.
 
Posted on 08-09-06 2:35 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

If yu have a latest adobe reader. do this.
open the word document --> file --> print --> change the printer name to Adobe PDF. It will ask you to save it. save it in some directory and it will be saved as pdf.
 
Posted on 08-09-06 2:36 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

It's not the question of reinventing the wheel, its modifying the wheel as your requirement.
He can't convert the background image, you know what that means? It means his software that doing the job is printing only the foreground pages and the content as PDF document.. How would you print the background? Thats where you need to modify the wheel. Bring those content to the foreground before you print it to the PDF.
 
Posted on 08-09-06 8:24 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

You dont need to worry about forground and background if you have a new version of work 2000 and above that most people have, the code can be written to read the word encoded files which looks like a messy HTML to pdf.
 
Posted on 08-09-06 8:48 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Have you ever wonder whats in the acrobat dll file. Look at it.
 


Please Log in! to be able to reply! If you don't have a login, please register here.

YOU CAN ALSO



IN ORDER TO POST!




Within last 365 days
Recommended Popular Threads Controvertial Threads
शीर्षक जे पनि हुन सक्छ।
NRN card pros and cons?
TPS Re-registration case still pending ..
What are your first memories of when Nepal Television Began?
Anybody gotten the TPS EAD extension alert notice (i797) thing? online or via post?
TPS Re-registration
Democrats are so sure Trump will win
Basnet or Basnyat ??
TPS EAD auto extended to June 2025 or just TPS?
I hope all the fake Nepali refugee get deported
nrn citizenship
Toilet paper or water?
Sajha has turned into MAGATs nest
Nas and The Bokas: Coming to a Night Club near you
ढ्याउ गर्दा दसैँको खसी गनाउच
Mamta kafle bhatt is still missing
ChatSansar.com Naya Nepal Chat
whats wrong living with your parents ?
डीभी परेन भने खुसि हुनु होस् ! अमेरिकामाधेरै का श्रीमती अर्कैसँग पोइला गएका छन् !
3 most corrupt politicians in the world
Nas and The Bokas: Coming to a Night Club near you
NOTE: The opinions here represent the opinions of the individual posters, and not of Sajha.com. It is not possible for sajha.com to monitor all the postings, since sajha.com merely seeks to provide a cyber location for discussing ideas and concerns related to Nepal and the Nepalis. Please send an email to admin@sajha.com using a valid email address if you want any posting to be considered for deletion. Your request will be handled on a one to one basis. Sajha.com is a service please don't abuse it. - Thanks.

Sajha.com Privacy Policy

Like us in Facebook!

↑ Back to Top
free counters