Convert .txt file or MS Word file into PDF format?

pdf
word

#1

I have an activity to convert a .txt file and its contents into PDF. Is it feasible to convert into PDF format using UiPath Studio?


#2

Hi @ranjith,

Yes it is feasible to do in UiPath.

Word:
Open ‘Save As’ window (F12 key) and change the ‘Save as type’ to pdf

.txt:
Open ‘File’ Menu, Click on ‘Print’ option (Ctrl+P) and Save as pdf

Regards,
Vikas


#3

Hi @ranjith,

For .txt there is no direct activity however for word to pdf you can use below activity :

Regards,
V


#4

Thanks @vikas_reddy_Vicky for the reply ,its works !!


#5

Thanks @Vikas.Jain for your reply.


#6

@vikas_reddy_Vicky This is only a workaround for a text file :pensive: I would like to use an activity which converts a textfile to pdf file without any gui automation.
@Vikas.Jain Is there are any hope that this feature/activity will come in the future for text file and/or Excel file.

I would also satisfied when the activity “Export to PDF” works for Open Office as well how it works for Microsoft Word.
Best Regard Simon


#7

@simonBendig,

I this case we have to create our own custom activity which converts .txt file to pdf and deploy it to UiPath manually. I hope the following answer by @Vikas.Jain would help you

Regards,
Vikas Reddy


#8

Hey @simonBendig

If you wants something as a feature wise and you thinks that it will be useful for all and make product more prodcutive and useful then share this in “Idea” category and let them know :slight_smile:

They will consider it and will see it will be good to work on that or they have some workaround

@badita will tell you more info about this :wink:

Regards…!!
Aksh


#9

When i,m trying to convert word document to pdf file. i,m getting the below error: Can anyone help me to get out from this issue! Thanks…

covertToPdf has thrown an exception

Source: Export to PDF

Message: Command failed

Exception Type: COMException

System.Runtime.InteropServices.COMException (0x800A1066): Command failed
at UiPath.Word.Activities.WordInteropActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)