Is it possible to load a PDF document (see link below) and print data from FWH application in defined fields? If so, where can I see an example?
http://www.cbsa-asfc.gc.ca/publications/forms-formulaires/ci1.pdf
Thank you,
Hello,
Thank you for the link. However, where can I find a good example? The links on the post no longer work.
Sincerely,
*-----------------------------------*
Function OpenPdf(cTempFile,cReport)
LOCAL oWnd, oPdf, arq
Default cReport := cTempFile
arq := ""
if PDFActivex(@arq)
  DEFINE WINDOW oWnd TITLE cReport
   oPdf = TActiveX():New( oWnd, arq )  // "AcroPDF.PDF" )
   // oPdf:LoadFile := cTempFile
    oPdf:Do( "LoadFile", cTempFile )
 Â
   oWnd:oClient = oPdf
  ACTIVATE WINDOW oWnd MAXIMIZED ;
        ON INIT SETWINDOWPOS( oWnd:hWnd, -1, 0, 0, 0, 0, 3 ) ;
        VALID (oPdf:End(), .T. )
else
  MsgAlert('Acrobat Reader is not install !')
end
RETURN NILHi Dutch,
Thank you. However I am looking to automatically transfer data from my FWH application to the PDF document. I do not want the user to have to re-enter data. I am looking to do a PDF Meld type transfer.
Darrell,
You might try what I have done in the past with TXT files.
Generate the PDF using whatever tool you have and include in it keywords for the fields you want to insert--something like [field1] (including the brackets and asterisks). This will be your form. Then load the entire file into a memory variable using memoread() or the binary functions if needed. Then do a search and replace for each of the fields using left() and right(). Then write the file out to a temp name and print it.
James
Hi James,
Thank you. Actually, I was able to use a third party application called Pdf Meld to transfer data from my FWH application to the PDF. It seems to be working well.
Hola,
Aquà tienes un ejemplo de fusión de datos y formulario PDF:
Gracias Manuel
Aqui tienes un codigo publicado en el foro que lo hace mediante ole ( Adobe acrobat , ojo creo que no vale Reader )
viewtopic.php?f=6t=25369p=154413#p154413
&&