Update Word doc then save as PDF without Sharepoint


Badge +2

Hi all

 

I need your help please.

 

I have a smartform which users enter some detail into, the process is then as follows:

Email HR with link to online form

HR inserts some info and submits on form

That info should update a MS Word template

That template should be saved as a PDF and emailed to user to print and sign

 

I have a problem in that i cant find anywhere were you can "Convert" or "Save As" a word doc to pdf without using sharepoint.

I found this link to another post and got really excited but doesnt work on K2 Blackpearl:

http://community.k2.com/t5/General-K2-Utilities/K2-Word-Document-Convertor/bc-p/65346#M19

 

your valuable assistance please.

 

Regards

Russell


13 replies

Badge +6

Hi Russel,


 


Have you concidered using the Save as PDF control in Smartforms itself, instead of using the Word Template.


 


Regards,


 


Yannick

Badge +2

Hi Yannick

 

Thanks for getting back to me.

 

do you mean saving the form results as a PDF?

The reason i want to use the word template is that it is an HR signed off document everyone has to use.

 

if im mistaken could you give me a step by step guide on how to do this please?

Badge +6

Hi Russel,


 


Yes, by using the Save as PDF control it will convert the form to the PDF Smartobject which can be found System folder in the context in K2 Designer. You can create a list view of the PDF Smartobject where all forms converted to PDFs are stored.  From there you can access all the PDFs created from the form. In the form you can add a button and set rule that when clicked it will save the form to PDF list.


 


Hope this helps.


 


Regards,


 


Yannick

Badge +2

Hi

 

Herein lies my problem.

 

The form and the Word template look different.

HR will only accept the word format of the document.

 

am i misunderstanding you?

Badge +6

Hi Russel,


 


I see, sorry it was I that misunderstanding you. Are you able to update the MS word template with info from HR? Im just investigating the next step after the template is updated.


 


Apologies,


 


Yannick

Badge +2

Hi

 

Yes i am able to update the word template from HR side.

The next step should be to email a pdf version of this file to the employee who will print and sign the document.

Badge +6

Hi Russel,


 


I think i might have found a solution. Would you tell me what version of Smartforms you are using?


 


Thanks,


 


Yannick

Badge +2
1.0.5
Badge +4

Hi Russel and Yannick

 

What you need to do is as follows:

1. I assume that the updated document is already stored in a smart object with a datatype (file)

2. There is a PDF Converter Service Object that is OOB. You can simply generate that smartobject from the Service Object.

3. On the form you can setup a rule on a button (or similar) which calls this smart object. 

4. For the file input parameter of the PDF Converter smart object you need to retrieve that document from your smartobject and use the result of that for the input parameter on the PDF Converter SMO.

 

I have attached a simple form which will demonstrate this to you.

 

Walkthrough

1. run the form

2. upload a file

3. click the save button - this will call the PDF Converter SMO and create a PDF version of the file that you uploaded and insert that into the SMO where the document is saved.

 

Once you have the pdf in the SMO you can easily attach this to a mail event in your process.

You can then clean up the records in the SMO in your process.

 

Badge +2

Hi SteveB

 

Tried deploying the package but recieve the attached error on deployment:

 

 


14896i6A72ED7FC90D5EEB.png
Badge +2

Hi Steveb and Yannick

 

Any response?

Yannick you mentioned you might have a solution.

Steveb would you mind looking at the error i get on your package deployment please.

 

Thanks in advance.

 

Regards

Russell

Badge +6

Hi Russel,


 


Sorry for the delayed response. The solution I was talking about is similar to SteveB's. I am currently investigating further and also why you are recieving the I/O error when you try to deploy the package.


 


Once again apologies for the late response.


 


Yannick

Badge

I am new to smartforms.I have a word doc template saved on the server.I want to append some text on the document from smartform or smartobject.

 

Can anyone help

Reply