Generate printable document

Generate printable document

  
Say I have this in a word document as an example:

"Your name is (entity.username)"

what I want to do is to, on request from a user, generate a document file that I would auto-generate information inside of it, how would I do this
Hello Kevin,

If you want something as simple as "Your name is (entity.username)", you can use just the platform features, like:


Note that the Method of the button should be set to "Submit".

Otherwise, if you want a more complex and styled content you should use some extension to do the trick, using the Office DLLs, for example.
Hope this helps on something.

Kind Regards,
Gonçalo M.
Gonçalo Martins wrote:
Hello Kevin,

If you want something as simple as "Your name is (entity.username)", you can use just the platform features, like:


Note that the Method of the button should be set to "Submit".

Otherwise, if you want a more complex and styled content you should use some extension to do the trick, using the Office DLLs, for example.
Hope this helps on something.

Kind Regards,
Gonçalo M.
 "Otherwise, if you want a more complex and styled content you should use some extension to do the trick, using the Office DLLs, for example."

Any specific advice as to what I can use as a plugin to accomplish this 
Hi Kevin, 

there is an old extension in the forge named word merge that does want your looking for.

Let me ask, it must be a doc? could it be a pdf file?
 
Ricardo
Hi again,

I didn't mentioned the PDF because you talked about Word format.
For that format you can use the extension suggested by Ricardo Araújo..I already used that and it works very well.
Another option is to use the Open XML SDK 2.0 for Microsoft Office, because since Office 2007, Microsoft uses xml base to store the data in all this kind of documents (.docx, xlsx, pptx...).
If you can use PDF format, you can generate html with css styles and convert to a well looking PDF file - you can use for example an extension from the Forge, named Html to PDF/Image Converter.

Gonçalo M.
Ricardo Araújo wrote:
Hi Kevin, 

there is an old extension in the forge named word merge that does want your looking for.

Let me ask, it must be a doc? could it be a pdf file?
 
Ricardo
Getting this error, how do I resolve this?
 
.NET Compilation.<br/><br/>C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets : warning MSB3287: Cannot load type library for reference "Microsoft.Office.Core". Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))<br/>C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets : warning MSB3287: Cannot load type library for reference "Microsoft.Office.Interop.Excel". Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))<br/>C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets : warning MSB3287: Cannot load type library for reference "Microsoft.Office.Interop.Word". Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))<br/>C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets : warning MSB3287: Cannot load type library for reference "VBIDE". Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))<br/>WordMerge.cs(7,32): error CS0234: The type or namespace name 'Interop' does not exist in the namespace 'Microsoft.Office' (are you missing an assembly reference?)<br/>WordMerge.cs(9,31): error CS0234: The type or namespace name 'Interop' does not exist in the namespace 'Microsoft.Office' (are you missing an assembly reference?).
 
Hi Kevin,

Did you installed Interops in the server?  http://www.microsoft.com/downloads/details.aspx?familyid=3c9a983a-ac14-4125-8ba0-d36d67e0f4ad&displaylang=en

Keep in mind that there are other solutions, but to help you I would need more context to what you need to achieve.

Ricardo

Gonçalo Martins wrote:
Hi again,

I didn't mentioned the PDF because you talked about Word format.
For that format you can use the extension suggested by Ricardo Araújo..I already used that and it works very well.
Another option is to use the Open XML SDK 2.0 for Microsoft Office, because since Office 2007, Microsoft uses xml base to store the data in all this kind of documents (.docx, xlsx, pptx...).
If you can use PDF format, you can generate html with css styles and convert to a well looking PDF file - you can use for example an extension from the Forge, named Html to PDF/Image Converter.

Gonçalo M.
 Hey, how do you use that plugin?
I see that to make a pdf you need the parameters "url" and "proxy"
to test I am trying to get a pdf of googles home page
 url:"http://www.google.com"
 proxy:"http://www.google.com"
I get this error

Could not find file 'C:\Windows\TEMP\TEMPILDIHNVOJF.pdf
Ricardo Araújo wrote:
Hi Kevin,

Did you installed Interops in the server?  http://www.microsoft.com/downloads/details.aspx?familyid=3c9a983a-ac14-4125-8ba0-d36d67e0f4ad&displaylang=en

Keep in mind that there are other solutions, but to help you I would need more context to what you need to achieve.

Ricardo
 
 What I have is some forms that users will fill out. After the users fill it out, I have a form that is autofilled using information contained from the forms that the users fill in. (I was trying the HTML to PDF approach, for some reason it will not accept the urls in my application)
 
Hi kevin

If that's the scenario then you go for the HTML to PDF option.

About that error, as far as I can remember don't use a proxy value unless you have one in the server where the service center is installed.

Ricardo
Hi Kevin

Did it worked?

Ricardo
Ricardo Araújo wrote:
Hi Kevin

Did it worked?

Ricardo
 
 No, the Html To Pdf option will not work
Ricardo Araújo wrote:
Hi Kevin

Did it worked?

Ricardo
 The url is aspx and not com, would that effect anything?
 
Ricardo Araújo wrote:
Hi Kevin

Did it worked?

Ricardo
 I was able to make google's page work (I was using the wrong url)
The error I get is (upon opening the file)

Adobe Reader could not open 'something.pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded)
 
Hi Kevin, 

check the Mime-Type property of the "Download widget" is set to "application/pdf" in the service studio.

Ricardo Araújo
Hi guys,
How do you convert a text file to a PDF file i.e my file is encoded i need to decoded it and convert
into a pdf file.Can anyone give me a sample implementation .
Regards,
ChandrasekarRadhakrishnan

Hi,
Please find my screenshot in the attachment.
I have used Base64ToBinary extension for decoding the data.Is that right?.
Can anyone explain me how to do this.
Regards,
ChandrasekarRadhakrishnan
Hi there,

To convert a screen to pdf, you have a component on forge that does it:
http://www.outsystems.com/forge/component/209/html2pdfconverter/

If you have a text that you want to convert to pdf, you just need to put the text in an empty screen and convert that screen.

If I understood you correctly, you have a text file, encoded in base64. In this scenario, you'll need to decode it to text in order to use the text.

Cheers
Hi Jose,
Thanks for replying me.Just one doubt how do i decode the text.
Regards,
ChandrasekarRadhakrishnan
Hi again

You can use the actions Base64ToBinary and BinaryDataToText from Binary extension. This will decode the file you have enconded in base 64 to regular binary data and then from binary data to text.

Cheers
Hi,
Thanks for responding me.Can you explain me in implementation so that i can learn from  thatAnd also could you tell how to apply this action dynamically.
Regards,
ChandrasekarRadhakrishnan
Hi,
I'm getting an error if i use this extension please see my screenshot.
Regards,
ChandrasekarRadhakrishnan

Hi Chandrasekar

Can you share the file or the code you are trying to use?!