Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combining multiple PDFs into one
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01656035
Message ID:
01656043
Views:
44
Thank you very much! I am assuming (without looking at the docs) that the last parameter to .SetParams, .T. is
what you call "append mode." This is great.

>Yes, You can.
>
>Alternative way is using append mode:
>
>
>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
>ELSE
>   ? m.lnRetval
>ENDIF
>
>* one hour later
>m.loSession = XFRX("XFRX#LISTENER")
>m.lnRetval = loSession.SetParams("output.pdf",,,,,,"PDF",,,,.T.)
>
>*https://eqeuscom.atlassian.net/wiki/spaces/DOC/pages/25821220/Properties+and+methods+common+in+XFRXListener+and+XFRXSession+classes#PropertiesandmethodscommoninXFRXListenerandXFRXSessionclasses-Setparams()
>* parameter tuAppend
>
>IF m.lnRetval = 0
>   REPORT FORM report2 OBJECT m.loSession
>ELSE
>   ? m.lnRetval
>ENDIF
>
>
>
>
>>>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform