Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

Word i PDF prebacivanje

[es] :: Visual Basic 6 :: Word i PDF prebacivanje

[ Pregleda: 5144 | Odgovora: 3 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

Dacex
ucenik

Član broj: 171043
Poruke: 65
*.adsl.eunet.rs.



Profil

icon Word i PDF prebacivanje19.08.2010. u 01:24 - pre 166 meseci
Imam problem trebam da pomoću vb6 prebacim wordov dokumenat u pdf dokument. Na koji način to radite? Bilo kakva pomoć je dobrodošla :)

Hvala unapred!
 
Odgovor na temu

t.marko016

Član broj: 255856
Poruke: 196
*.dynamic.isp.telekom.rs.



+10 Profil

icon Re: Word i PDF prebacivanje19.08.2010. u 07:04 - pre 166 meseci
http://www.elitesecurity.org/t...PDF-dokumeta-iz-WORD-dokumenta
 
Odgovor na temu

unisoft
Uzice

Član broj: 124050
Poruke: 346
*.dynamic.isp.telekom.rs.



+1 Profil

icon Re: Word i PDF prebacivanje19.08.2010. u 08:44 - pre 166 meseci
Eboga zivot potrudi se malo i dobices mnogo odgovora bez tudje pomoci, a i ova tema vec postoji.

Kucaj na googl-u Creating PDF files in Visual Basic 6 i kao rezultat dobices mnogo sajtova na kojima pise kako se to radi. Najlaksa opcija ti je kupovina ActiveX kontrole koja prebacuje dokumente u PDF.

[url=]http://www.cete.com/Products/Dynamic_PDF_COM_ActiveX_Products.csp?gclid=CKqL9LiExaMCFQM9ZgodY1w8YQ[/url].
 
Odgovor na temu

djvlajko

Član broj: 89354
Poruke: 310
*.dynamic.isp.telekom.rs.



Profil

icon Re: Word i PDF prebacivanje27.08.2010. u 15:18 - pre 166 meseci

Moras imati instaliran Acrobat distiller (pojavice se kao stampac).

Posle toga, ova funkcija ce ti kreirati PDF fajl izabranog naziva.

Parametri su (sem prvog), Word dokument od koga se pravi PDF i naziv PDF (sa putanjom)

Code:

Public Function DOC2PDF(wWordApp As Word.Application, WordDoc As Word.Document, sPDFFile As String)

   On Error GoTo Greska

   Dim Fso ' As FileSystemObject
   Dim sPrevPrinter ' As String
   Dim oDistiller ' As PDFDistiller.PDFDistiller.1

   Set Fso = CreateObject("Scripting.FileSystemObject")
   
   Set oDistiller = CreateObject("PDFDistiller.PDFDistiller.1")

   If oDistiller Is Nothing Then
  
      MsgBox "Greška : PDF dokument se ne može kreirati. Adobe Acrobat Distiller nije dostupan", vbCritical, "GREŠKA"
  
      GoTo Kraj
    
   End If

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

   
  ' Remember current active printer
   sPrevPrinter = wWordApp.ActivePrinter

   wWordApp.ActivePrinter = "Acrobat Distiller"

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

   wWordApp.ActivePrinter = sPrevPrinter
  
  ' 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

   GoTo Kraj
  
Greska:

   MsgBox "Greška u kreiranju PDF dokumenta", vbInformation, "GREŠKA"

Kraj:

   Set oDistiller = Nothing
   Set Fso = Nothing

End Function



 
Odgovor na temu

[es] :: Visual Basic 6 :: Word i PDF prebacivanje

[ Pregleda: 5144 | Odgovora: 3 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.