Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combining multiple PDFs into one
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01656035
Message ID:
01656037
Vues:
52
>>Hi,
>>
>>I am working on a routine that will create a number of PDF files. Each PDF is FRX report converted via a XFRX. Each FRX is a Form/Order. Therefore, it is not possible for me to combine various FRX into one.
>>If I wanted to have all these PDF to be in one PDF, would it be possible to do from VFP application?
>>
>>TIA
>
>Hi Dmitry,
>
>You can combine more reports into one output file:
>
>USE demoreps\invoices ORDER customer
>LOCAL m.loSession, m.lnRetval
>m.loSession= xfrx("XFRX#INIT")
>m.lnRetVal = m.loSession.SetParams("output.pdf",,,,,,"PDF")
>IF m.lnRetVal = 0
>   m.loSession.ProcessReport("report1")
>   m.loSession.ProcessReport("report1")
>   m.loSession.ProcessReport("report2")
>   m.loSession.finalize()
>ELSE
>   ? m.lnRetVal
>ENDIF
>
>
>
>
>USE demoreps\invoices ORDER customer
>LOCAL m.loSession, m.lnRetval
>m.loSession = XFRX("XFRX#LISTENER")
>m.lnRetval = loSession.SetParams("output.pdf",,,,,,"PDF")
>IF m.lnRetval = 0
>   REPORT FORM report1 OBJECT m.loSession NOPAGEEJECT
>   REPORT FORM report1 OBJECT m.loSession NOPAGEEJECT
>   REPORT FORM report2 OBJECT m.loSession
>ELSE
>   ? m.lnRetval
>ENDIF
>
>
>MartinaJ

Hi Martina,

First, thank you very much. I have a follow up question. Do you know if I could have some code between each REPORT FORM in your example above? For example,
IF m.lnRetval = 0
   *-- Code here that creates a cursor for Report1
   REPORT FORM report1 OBJECT m.loSession NOPAGEEJECT
   *-- Code here that creates a cursor for Rpoert2
   REPORT FORM report1 OBJECT m.loSession NOPAGEEJECT
   *-- Code here that creates a cursor for Report3
   REPORT FORM report2 OBJECT m.loSession
ELSE
   ? m.lnRetval
ENDIF
See the line *-- Code here above
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform