Using PdfCreator

Using PdfCreator

Postby chiaiese » Fri Apr 14, 2006 10:17 am

Has anybody used the com interface of pdfcreator ?
I would use it to create a pdf and email directly from within Fwh, without the dialogbox of pdfcreator prompting for email address

The documentation found in pdfcreator directory is not very clear to me
I would really appreciate any working sample
something like:

oPdf := createobject("Pdfcreator.Application")
how to print ?
oPdf:cSendMail( OutputFilename , Recipients )

best regards
Roberto Chiaiese
chiaiese
 
Posts: 84
Joined: Wed Feb 08, 2006 10:32 pm
Location: Roma, Italia

Postby Antonio Linares » Sat Apr 15, 2006 10:04 am

Roberto,

> The documentation found in pdfcreator directory

Where have you located such documentation ? Just installing the pdfcreator software ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42048
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

PDF creator

Postby chiaiese » Tue Apr 18, 2006 12:46 pm

Antonio,
Yes, take a look to: PDFCreator_english.chm, it is located in the PDFCreator 9.0 install directory

regards
Roberto
chiaiese
 
Posts: 84
Joined: Wed Feb 08, 2006 10:32 pm
Location: Roma, Italia

Postby Verhoven » Sun Apr 23, 2006 11:03 am

Por fin he dado con la mejor solución para generar archivos pdf desde mi programa de forma automática.

Bajar pdfcreator que es gratuito de http://sourceforge.net/projects/pdfcreator/
Instalarlo.

Modificar el registro de windows de la aplicación:
HKEY_CURRENT_USER
Software
pdfcreator
program


Los valores de las variables que se deben cambiar para que guarde los ficheros pdf que se van mandando, con el mismo título que le damos al objeto PRINT de nuestro programa (con lo que de esta forma elegimos nosotros el nombre del fichero) son:

Autosavedirectory C:\KK ( o el que más nos guste )
Autosavefilename cambiar el que trae <DateTime> por <Title>
Autosaveformat pdf
.
.
.
useautosave 1


Es muy bueno este programa.
Verhoven
 
Posts: 520
Joined: Sun Oct 09, 2005 7:23 pm

Postby Ari » Thu Mar 22, 2007 12:13 pm

Eu gostaria de usar o PDFCreator e autoconfigurar:

usando: TOleAuto():New("PDFCreator.Aplication")

mas gera erro.

Instalei a versao 9 de PdfCreator

alguem tem um exemplo completo ?

Ari
User avatar
Ari
 
Posts: 228
Joined: Fri Feb 03, 2006 4:21 pm
Location: São Paulo, SP - Brazil

PDF maintanence

Postby Boris » Sun Apr 15, 2007 1:47 am

I am using IsedQuickPDf
I load PDF and write the needed text all over the PDF (nom mater how many pages PDF has)
Then I can save the new PDF name, and then I can use this file whatever way I want (also to send as the mail attachement)
Using xharbour/FWH
User avatar
Boris
 
Posts: 16
Joined: Sun Nov 27, 2005 1:57 am

Postby chiaiese » Sun Apr 15, 2007 9:03 am

You can try this little function with PdfCreator version 0.9.3

Code: Select all  Expand view
function printPdf()

local oPdfApp := CreateObject("PDFCreator.clsPDFCreator")
local cASD := oPdfApp:cOption("AutoSaveDirectory" )
local cASF := oPdfApp:cOption("AutoSaveFileName" )

oPdfApp:cOption("UseAutoSave", 1 )
oPdfApp:cOption("UseAutoSaveDirectory", 1 )
oPdfApp:cOption("AutoSaveStartStandardProgram", 1 )
oPdfApp:cOption("AutoSaveDirectory", "c:\temp" )
oPdfApp:cOption("AutoSaveFileName" , "Mypdf" )
oPdfApp:cSaveOptions()

// print something
oPdfApp:cPrintPDFCreatorTestpage()

oPdfApp:cOption("AutoSaveDirectory", cASD )
oPdfApp:cOption("AutoSaveFileName" , cASF )
oPdfApp:cSaveOptions()

oPdfApp = nil
return (nil)


for other functionality look at the help file
regards

Roberto Chiaiese
chiaiese
 
Posts: 84
Joined: Wed Feb 08, 2006 10:32 pm
Location: Roma, Italia

Postby Patrick Mast » Tue Apr 17, 2007 7:56 am

chiaiese wrote:You can try this little function with PdfCreator version 0.9.3

We can not get the pdfCreator to work in Vista. Is there anyone who runs it in Vista? :roll:

Patrick
User avatar
Patrick Mast
 
Posts: 246
Joined: Sat Mar 03, 2007 8:42 pm

Postby AngelSalom » Fri Apr 20, 2007 4:45 pm

No consigo que esta función haga nada, simplemente se ejecuta y no realiza nada. Tengo instalado pdfcreator 0.92



function Main()

local oPdfApp := CreateObject ("PDFCreator.clsPDFCreator")
local cASD := oPdfApp:cOption("AutoSaveDirectory" )
local cASF := oPdfApp:cOption("AutoSaveFileName" )

oPdfApp:cOption("UseAutoSave", 1 )
oPdfApp:cOption("UseAutoSaveDirectory", 1 )
oPdfApp:cOption("AutoSaveStartStandardProgram", 1 )
oPdfApp:cOption("AutoSaveDirectory", "c:\temp" )
oPdfApp:cOption("AutoSaveFileName" , "Mypdf" )
oPdfApp:cSaveOptions()

// print something
oPdfApp:cPrintPDFCreatorTestpage()

oPdfApp:cOption("AutoSaveDirectory", cASD )
oPdfApp:cOption("AutoSaveFileName" , cASF )
oPdfApp:cSaveOptions()

oPdfApp = nil
return (nil)
Gracias
Angel Salom
Visionwin Software - https://www.visionwin.com
------------------------------------------------------------
fwh 19.05 - harbour 3.2 - bcc 7.4
User avatar
AngelSalom
 
Posts: 727
Joined: Fri Oct 07, 2005 7:38 am
Location: Benicarló (Castellón ) - España

Postby Ari » Fri Apr 20, 2007 10:33 pm

Eu tentei tambem e não fazia nada, só dava erro. e consegui sucesso com as funcoes abaixo

Code: Select all  Expand view
* =========================================================================
Function CheckPDF()
* =========================================================================
  local oPDF := TOleAuto():New("PDFCreator.clsPDFCreator")

  IF Ole2TxtError() != "S_OK"
     MsgAlert("PDFCreator não está disponivel", "Esta opção requer o  PDFCreator")
     oPDF:End()
     return .f.
  Endif
  oPDF:End()

return .t.

* =========================================================================
Function ConfigPDF()
* =========================================================================
  local nKey := 2147483649 
  local oReg := TReg32():New( nKey, "SoftWare\PDFCreator\Program" )

  oReg:Set("AutosaveDirectory", DirTmp()  )
  oReg:Set("AutosaveFilename" , "<Title>" )
  oReg:Set("AutosaveFormat"   , "pdf"     )
  oReg:Set("UseAutosave"      , 1         )
  oReg:Set("SendEmailAfterAutoSaving" , 0 )
  oReg:Close()

return nil


Ari
User avatar
Ari
 
Posts: 228
Joined: Fri Feb 03, 2006 4:21 pm
Location: São Paulo, SP - Brazil

Postby AngelSalom » Sat Apr 21, 2007 6:34 pm

Oka, con esto modificas las claves del registro y consigues modificar sus variables. Gracias!! con esto ya me apaño para lo que necesito.

Un saludo.
Angel Salom
Visionwin Software - https://www.visionwin.com
------------------------------------------------------------
fwh 19.05 - harbour 3.2 - bcc 7.4
User avatar
AngelSalom
 
Posts: 727
Joined: Fri Oct 07, 2005 7:38 am
Location: Benicarló (Castellón ) - España

Como enviar el PDF por E-Mail despuese.

Postby PAUL SIMM » Fri Aug 17, 2007 2:30 pm

Este opción abre el Outlook con el PDF como adjunto pero no tiene ni E-Mail de destio ni Asunto:

oReg:Set("SendEmailAfterAutoSaving" , 1 )

Alquien sabe como añadir estos datos para el envio automatico de facturas.
Regards/Saludos
Paul

paul@pes-systems.net
User avatar
PAUL SIMM
 
Posts: 82
Joined: Fri Oct 07, 2005 7:59 am
Location: Madrid, Spain

Postby Kleyber » Fri Aug 17, 2007 3:21 pm

Hi all,

It seems to be very interesting... and how could I put this to generate PDFs from my preview (RPreview)?

TIA,
Kleyber Derick

FWH / xHb / xDevStudio / SQLLIB
User avatar
Kleyber
 
Posts: 581
Joined: Tue Oct 11, 2005 11:28 am
Location: São Luiz, Brasil

Postby don lowenstein » Fri Aug 17, 2007 5:28 pm

I use Image2PDF to convert .emf files (created by FWH previewer) into .pdf files - works well. Just a couple of changes in tpreview.prg to "capture" the .emf files while they are still alive.

This works great for printing via FWH on internet apps as the cgi-program can invoke the report object - which in turn creates the .emf files for viewing - which I grab and convert that "Image2PDF" on the fly - then the app simply delivers the pdf file over the web.

Also, support from Image2PDF is excellent. Furthermore, you can purchase a license which enables you to give unlimited, royality free distribution.
Don Lowenstein
www.laapc.com
User avatar
don lowenstein
 
Posts: 197
Joined: Mon Oct 17, 2005 9:09 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 32 guests