cancel
Showing results for 
Search instead for 
Did you mean: 

How to set output device programatically

former_member182485
Active Contributor

Hi Experts,

I have designed a print form in adobe form printing with the defalut output device give some error

so I created one output device which works fine with the pdf form

I just want to know how can I set this output device as default programatically.

I donot want to chane the output device of user profile, my device should be taken as default device only when this print program is executed.

Regards

Bikas

Accepted Solutions (1)

Accepted Solutions (1)

OttoGold
Active Contributor
0 Kudos

Hello,

I use the following code to set the output device to the PDF preview, so the user don´t have to choose the printer (and make a mistake here). I guess it will be easy for you to adapt that.

CALL FUNCTION 'ZPDF_SET_OUTPUT_MODE'

CHANGING

FP_OUTPUTPARAMS = fp_outputparams.

fp_outputparams-dest = 'ZPDF'.

fp_outputparams-nodialog = 'X'.

fp_outputparams-preview = 'X'.

Regards, Otto

former_member182485
Active Contributor
0 Kudos

Thaks a lot for your fast reply.

I have one more issue if I am calling the form in loop how can I get the preview of all the form at one go

as we do in the smartforms.

Now I am getting the preview of secand form on back button.

Regards

Bikas

Answers (1)

Answers (1)

OttoGold
Active Contributor
0 Kudos

You can get only a single document preview, I think. I have never tried, but I don´t think that is possible.

What you see is not the second document preview, but the last document in the batch, is that right?

You can experiment with the form bundling (bundling the forms when sending them to ADS improves performance), but I don´t think that will help.

Why do you need to do this "mass preview" anyway? Maybe you should create a tool to help the user display these preview. I am close to HR and can imagine a tool, which is used for mass personal profile forms. I would create a simple report, where you click on the line and get the document preview/ profile of the selected person.

Imho if you do the "mass" print/ generation, your task is to be fast and you target on the printer. If you work with a single form, then it is like "user-oriented".

Regards, Otto