We are pleased to announce the release of more macros in Umbraco. The macros involved in this release are below:
You can download the macro from the social coding website of your choice. The macros include an Import from Word/PDF button that displays the uploaded document. These will help you to get the contents of your document using Aspose.Words and Aspose.PDF whether you have Microsoft Word or Adobe Reader installed on your machine or not.
Installing the Macro
Download the macro package from one of the following locations:
Once downloaded, please follow these steps to install this package into your Umbraco website:
- Log in to the Umbraco Developer section, for example http://www.myblog.com/umbraco/
- From the tree, expand the Packages folder.
From here there are two ways to install a package: select Install local package or browse the Umbraco Package Respository.
- If you install local package, do not unzip the package but load the zip into Umbraco.
- Follow the instructions on screen.
Note: You may get a ‘Maximum request length exceeded’ error when installing. You can easily fix this issue by updating the ‘maxRequestLength’ value in your Umbraco web.config file.
<httpRuntime requestValidationMode="2.0" enableVersionHeader="false" maxRequestLength="25000" />
Using the Macro
After you have installed the macro it is really simple to start using it on your website:
- Make sure you are logged in to the Umbraco Developer section, for example http://www.myblog.com/umbraco/
- Click Settings in the list of sections at the bottom left of the screen.
- Expand the Templates node and select the template that you want to add macro to, for example Blog post.
- Select the position in the selected template where you want to the button.
- Click Insert Macro on the top ribbon.
- From Choose a macro, select the installed macro and click OK.
You have successfully added the template. A button titled Import to Word/Pdf now appears on all pages created using this template. Anyone can simply click the button and import the contents from a Word or PDF document.
Please check the video below to see macro in action.