Menu

Umbraco Import from Pdf using Aspose.Pdf

Aspose Marketplace

Umbraco Import from Pdf using Aspose.Pdf

The Umbraco Import from Pdf allows user to get contents from Pdf document. This macro make it easy to get from Pdf file on any location either Adobe Reader is not available and displayed them online.It adds a simple file browser control and Import from Pdf button, by clicking on Import from Pdf it converts into html and then display content of Pdf document online.
Below are few screenshots to show hows it work.

How to install and use Import from Pdf macro?

Please check our blog post for more details

Sample Code

Below the Codebehind Import from Pdf:

~~~~~

if (FU_Doc.HasFile)
{
// Check for license and apply if exists
string licenseFile = Server.MapPath("~/App_Data/Aspose.Total.lic");
if (File.Exists(licenseFile))
{
License license = new License();
license.SetLicense(licenseFile);
}

            // Initialize the stream to read the uploaded file.
            Stream myStream = FU_Doc.FileContent;
            //open document
            Document pdfDocument = new Document(myStream);
            string path = Server.MapPath(".")+"//"+FU_Doc.FileName.Replace(".pdf",".html");
            pdfDocument.Save(path,SaveFormat.Html);
            string extractedText = File.ReadAllText(path);
            div_display.InnerHtml = extractedText;
        }
        else
        {
            LBL_Error.Text = "Please Upload File";
        }

~~~~

Video

Please check the video below to see this macro in action.

Download


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.