Save word to pdf

Hello Everyone,

How can I save a word to pdf directly? is there any way to that? I just don’t want it to save as word then convert it later. Is it possible to save it directly as pdf?

Hi @Gus_Fring

You can use Export To PDF Activity to do this.

https://docs.uipath.com/activities/docs/word-export-to-pdf

  1. In Assign, String filename = Path.GetFileNameWithoutExtension(item)
  2. Export to PDF, pass like this “folderPath"+filename+”.pdf"

Check out the Video

Regards
Gokul

Hello @Gokul001,

I already done that but what I want is directly save the document as PDF. So to elaborate more, I am editing a Document using word then after that I’ll save it but what I want is save it directly as PDF without using those activity. Is there any way to do that?

HI @Gus_Fring

Have you tried with Copy activity

In the destination → Give the path with the extension of .pdf

image

Regards
Gokul

Hello @Gus_Fring
You can use Save Document as PDF activity to save word as a PDF. Otherwise copy and paste the file by changing the Extension, it may have a chance to corrupt the file.
image

Yes I tried copying the file instead of using that activity but the file is corrupted. Is there a solution for that?

I don’t think so we have any other activities

Can you tell us why you don’t use the Save Document as PDF activity do you have any specific reason? @Gus_Fring

HI @Gus_Fring

Checkout this

Regards
Sudharsan

I use that now but I encounter some error like it can’t convert the word. My word has add-ins, does it affect the Save Document as PDF?

Hi @Gus_Fring

Can you share the sample Word document?

Hi Gokul,

Sorry but it is confidential. I tried that activity in a simple sequence and it works but when I apply it to Reframework it doesn’t convert the word to pdf. I am using an out_argument on the file name. Or should I use in_argument?

Hi @Gus_Fring

To avoid confusion try to use In/Out Argument