Getting user entered values

Post here any questions/suggestions you have about novaPDF SDK or novaPDF OEM.
lanksheard
Posts: 4
Joined: Wed Apr 13, 2011 7:09 pm

Getting user entered values

Postby lanksheard » Wed Apr 13, 2011 7:22 pm

We have an application that can print its own pages as well as call WORD to print pages as needed.
Is it possible to get values the user provided from the first profile so the subsequent prompts will not be needed?
Thanks.

Support
Posts: 223
Joined: Wed Dec 16, 2009 12:46 pm
Location: Cluj-Napoca, Romania
Contact:

Re: Getting user entered values

Postby Support » Thu Apr 14, 2011 7:40 am

Hello,

If you are using novaPDF in the assembly you have 2 choices: you can change the values manually for each print or you can do it programatically using our SDK solution.

For your issue however you would need the SDK as the other versions cannot preserve the user values from the profile for further printing.

Thank you.

lanksheard
Posts: 4
Joined: Wed Apr 13, 2011 7:09 pm

Re: Getting user entered values

Postby lanksheard » Thu Apr 14, 2011 3:28 pm

Yes, we are using the SDK; the problem is that the user has selected a print job that contains some pages from our application followed by some pages from a WORD document then possibly some more pages from our application is currently being asked to fill in the form 3 times. When WORD is printing the target PDF is the name of the WORD document not the name the user provided in the first part of the print job.

I know that we can provide a name and other options programmatically, but to make it consistent with other applications using novaPDF, we would like to have the profile dialog offer the user the normal novaPDF options then be able to pass those options to subsequent parts of the entire print job.

As an example our application Foo will print 2 pages – the novaPDF profile dialog comes up and the user provides the options he/she would like, Now the application Foo is going to call WORD to print some pages as part of the same print job but at this point we do not know the user responses in the previous part of the print to provide them to novaPDF. So the user is prompted again.
We would like to be able to provide novaPDF with the previously selected options and not prompt the user, so the print job can continue.

Is this possible, or do we have to provide our own dialog in this case?

Support
Posts: 223
Joined: Wed Dec 16, 2009 12:46 pm
Location: Cluj-Napoca, Romania
Contact:

Re: Getting user entered values

Postby Support » Fri Apr 15, 2011 9:18 am

Hello,

We do not understand exactly what are you referring to. What form has the user to fill, what exact options are on this form?
If you are referring the the Save As dialog, this dialog is shown by novaPDF when a new print job is started, so if you receive several Save As dialogs, there are several print jobs, not only one. novaPDF does not have a feature to take the file name from previous print job, but you may do this in your application with the SDK like this:
- for the first print job prompt the save as dialog and let the user choose the file name
- you may retrieve with the SDK what was the last PDF file name saved by novaPDF
- for the next jobs change the Save options to not prompt for a save dialog but specify a certainn folder and file name for the next PDF file

Thank you.

lanksheard
Posts: 4
Joined: Wed Apr 13, 2011 7:09 pm

Re: Getting user entered values

Postby lanksheard » Fri Apr 15, 2011 3:27 pm

Sorry for not making myself clear and thank you for pointing me to GetPDFFileName, as yes it is the Save As dialog that I'm referring to.

Let me try again. Our application 'Foo' as an example may have 3 pages from 'Foo' 4 pages from a WORD document then 3 pages from 'Foo'
To the user this appears as one print job. We have the case where the user selects a physical printer working; ‘Foo’ switches the printer to novaPDF and provides a temporary file name and other options to novaPDF. Then novaPDF collects all the 10 pages, from the jobs described above, into temporary PDF then ‘Foo’ prints that PDF to the printer the user selected. The print jobs are handled this way so, in the case of a duplex printer the back sides of will be used between the print jobs.

Now in the case where the user selects novaPDF as the desired printer ‘Foo’ lets the novaPDF dialog come up. Now here’s where we would like ‘Foo’ to get the options that the user selected, because we would like to turn off ‘Open PDF with default viewer’ and get the name of the PDF file, before any print has gone to novaPDF. ‘Foo’ can then turn on ‘Open PDF with default viewer’ if the user selected on the last part of the print job, so that this works as the user would expect.

I hope this makes it a little clearer.

Thanks.

lanksheard
Posts: 4
Joined: Wed Apr 13, 2011 7:09 pm

Re: Getting user entered values

Postby lanksheard » Fri Apr 15, 2011 6:09 pm

I guess what I'm asking for is an event that is before start of print and after the user has pressed OK in the 'Save As' dialog, where I can get the options and make changes to the options if needed.

Support
Posts: 223
Joined: Wed Dec 16, 2009 12:46 pm
Location: Cluj-Napoca, Romania
Contact:

Re: Getting user entered values

Postby Support » Mon Apr 18, 2011 1:26 pm

Hello,

Thank you for the explanation, we understand the problem now.
Unfortunately the changes made by the users in the Save As dialog that novaPDF shows when the print job is started are only used internally and cannot be retrieved with the COM. As you already found, you can find the name of the PDF file with the GetPDFFileName method, but the rest of the changes in this dialog, as the open PDF viewer option, are not available.
I think the only solution in your situation would be to have your own form to collect user options, instead of using the Save As dialog provided by novaPDF.

Thank you.


Return to “Developer Tools”