Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Merging PDF (Adobe Acrobat) documents
Message
 
À
11/02/2002 09:14:42
Stan Vaninger
Mitek Industries, Inc
Missouri, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
00618280
Message ID:
00621451
Vues:
14
>I have a VFP app (deployed and in use for about a year) that merges 2 or 3 PDF documents created from VFP report forms and then emails the merged document.
>
>I have just recently made some enhancements to this app and migrated it from VFP6 SP5 to VFP7 SP1 and discovered that the code that merges the 2 or 3 PDF documents into one seems to be broken.
>
>This is the code I am using to merge the documents:
>
>local lcPathFile
>lcPathFile = Alltrim(company.com_emAttach)
>
>* Open Acrobat Exchange
>oAppMerge = CreateObject('AcroExch.App')
>oPDDoc = CreateObject('AcroExch.PDDoc')
>
>* Set the directory
>local lcDir, lnLastPage, lnInsertPages
>lcDir = JustPath(lcPathFile) + '\'
>
>* Put .PDF files into an array
>declare apdf[1]
>adir('apdf',lcDir+'*.pdf')
>
>* Open the first file in the directory
>oPDDoc.Open(lcDir+apdf[1,1])
>
>for i = 2 to alen(apdf,1)
>* Get the total pages less one for the last page number [zero based]
>lnLastPage = oPDDoc.GetNumPages - 1
>
>* Open the file to insert
>oInsertPDDoc = CreateObject('AcroExch.PDDoc')
>oInsertPDDOc.Open(lcDir+apdf[i,1])
>
>* Get the number of pages to insert
>lnInsertPages = oInsertPDDoc.GetNumPages
>
>* Insert the pages
>oPDDoc.InsertPages(lnLastPage, oInsertPDDoc, 0, lnInsertPages, .T.)
>
>* Close the document
>oInsertPDDoc.Close
>
>next
>
>* Save the entire document
>oPDDoc.Save(1,lcPathFile)
>
>* Close the PDDoc
>oPDDoc.Close
>
>* Close Acrobat Exchange
>oAppMerge.Exit
>
>
>The 2 or 3 separate PDF documents are still being generated correctly, the For/Next loop in the above code seems to work correctly and the Save line executes without error message, but no merged document is produced.
>
>My development machine and the client PC are both using Windows 2000 SP2. The weird thing about this is that I have tested the exact same app on a third workstation also with Windows 2000 and it works! The merged document is created just as before. Any thoughts on what the issue could be here?
>
>Any help would be greatly appreciated.
>
>Stan
>
>
>--------------------------------------------------------------------------------
> Translate this page English to Spanish English to Portuguese English to French English to German English to Italian French to English German to English Italian to English Portuguese to English Spanish to English Russian to English English to Japanese English to Korean English to Chinese Japanese to English Korean to English Chinese to English Reply to message | Post new message | Message List

Stan,

The problem might be on the Adobe side. Are you sure the versions are the same there? You might also want to install (if not already done) their latest upgrade (5.0.5) which solved at least one problem I had with a Syntax font that refused to appear in the PDF.

José
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform