Forum How do I...?

.Net with multiple input files

tholland
Prince is an awesome converter. The output I've gotten from it far exceeds other products we tried. But I could use a little clarification on the documentation, specifically regarding its .Net api....

To date, I've been using a command-line procedure to dynamically convert a list of html files into a single PDF. But I would like to build the same functionality by calling an instance of Prince from within .Net.

I guess I could probably execute it with a shell call, but it would seem more elegant to pass the files into the Prince.Convert() function call.

But, I don't see any documentation on how to do that, and building a string of filenames doesn't seem to work so far.

Any advice?
mikeday
At the moment it requires a shell call, we haven't extended the API to handle multiple file names yet. The simplest way of doing so would probably be to add a Convert() method that takes an array of strings.
tholland
I was wondering: it looked like there was an entry in the roadmap that might pertain to this functionality. But I couldn't tell whether it was completed or not.

Update Prince wrappers (Java, PHP, .NET, ActiveX) to support new Prince functionality, such as application to multiple documents.


Has this been addressed in the latest version?

I went ahead and developed our app making use of a shell call (as described in original post) which has been working great.

However, it was discovered today that passing certain url parameters - specifically any with an apostrophe character - seem to cause unexpected issues. The pages are added, but the stylesheet info seems to be missing/corrupt.

I was hoping maybe the .Convert() function had been improved, and would help to address our trouble with parameters.
mikeday
Can you quote the input URLs with double quotes to avoid problems with apostrophes?
mikeday
Today we have released an updated .NET wrapper for Prince that includes a new ConvertMultiple() method.