Convert XPS files to PDF files

Hi,

I’m trying to convert XPS fies to PDF files, anybody please suggest solution for this, Im using this expression in invoke code:
Pdfsharp.Xps.XpsConverter.Convert(item, item.Replace(“.xps”,“.pdf”),0)
and getting error as Expression does not produce value

Thanks

Hi @Geeta

Check this

Regards,

Hi @lrtetala ,

how do i use this in UiPath, can u pls help

I did a simple test of following code
Pdfsharp.Xps.XpsConverter.Convert("Document 01.xps", "Document 01.pdf",0)
It works like a charm. So the problem should be somewhere else.

As you are using .NET code I assume you have some programming skills and are able do debug:
check data type of “item” (should be string)
check value of “item” (should be XPS file name)

Cheers