[OfficeUtils] How to download output GenerateWordFile.WordBinary of OfficeUtils as pdf

Forge Component
(26)
Published on 17 Sep by Elena Novozhilova
26 votes
Published on 17 Sep by Elena Novozhilova

Dear All,

I am using OfficeUtils to build a docx document. I am successfully able to build and download the document as docx. However I am unable to download the file as pdf, I tried simply using the file name as filename.pdf while downloading but that didn't work. Also I looked up on forge/google to convert wordbinary to data to pdf but could not find anything.


Could you please advise if there is a way to download the same as pdf?

Thanks,

Zubair

Hello Zubair, 

I think the format of word in Officeutils is DocX and it does not have the capability to convert to PDF. 

Please, read this topic, as it seems there is a component on forge that can do that, or you can use external services. 

https://www.outsystems.com/forums/discussion/30542/convert-docx-xlsx-and-or-pptx-to-pdf/

Cheers

Eduardo Jauch wrote:

Hello Zubair, 

I think the format of word in Officeutils is DocX and it does not have the capability to convert to PDF. 

Please, read this topic, as it seems there is a component on forge that can do that, or you can use external services. 

https://www.outsystems.com/forums/discussion/30542/convert-docx-xlsx-and-or-pptx-to-pdf/

Cheers


Hello Eduardo,

Yes the format of word is Docx in OfficeUtils, I shall check the suggested article.

Thanks for your help!.

Regards,

Zubair

Dear Eduardo,

Just to update you that I tried using this forge component, and I am getting the below error while publishing it as extension, I have posted the feedback to component developer as well.


.NET Compilation.

Project file contains ToolsVersion="12.0". This toolset may be unknown or missing, in which case you may be able to resolve this by installing the appropriate version of MSBuild, or the build may have been forced to a particular ToolsVersion for policy reasons. Treating the project as if it had ToolsVersion="4.0". For more information, please see https://go.microsoft.com/fwlink/?LinkId=291333.
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(983,5): warning MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.6.1" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. 
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. 
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "System.Data", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. 
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "System.Web", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. 
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2015,5): error MSB3091: Task failed because "AxImp.exe" was not found, or the correct Microsoft Windows SDK is not installed. The task is looking for "AxImp.exe" in the "bin" subdirectory beneath the location specified in the InstallationFolder value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx40Tools-x86. You may be able to solve the problem by doing one of the following: 1) Install the Microsoft Windows SDK. 2) Install Visual Studio 2010. 3) Manually set the above registry key to the correct location. 4) Pass the correct location into the "ToolPath" parameter of the task.

Hi, 

What VS and dot net version do you have installed on your computer?