Pdf Import Rewrite

Pdf Import rewritten to greatly improve QR Code detection, reduce
reliance on iTextSharp and improve thumbnails. Fixes #50
This commit is contained in:
Gary Sharp
2016-08-26 09:46:35 +10:00
parent 44f6d325db
commit 5ea9a814d6
98 changed files with 3168 additions and 3202 deletions
@@ -1,7 +1,9 @@
using Disco.BI.DocumentTemplateBI.ManagedGroups;
using Disco.BI.Extensions;
using Disco.Models.UI.Config.DocumentTemplate;
using Disco.Services;
using Disco.Services.Authorization;
using Disco.Services.Expressions;
using Disco.Services.Plugins.Features.UIExtension;
using Disco.Services.Web;
using System;
@@ -137,8 +139,8 @@ namespace Disco.Web.Areas.Config.Controllers
DeviceType = typeof(Disco.Models.Repository.Device).AssemblyQualifiedName,
JobType = typeof(Disco.Models.Repository.Job).AssemblyQualifiedName,
UserType = typeof(Disco.Models.Repository.User).AssemblyQualifiedName,
Variables = BI.Expressions.Expression.StandardVariableTypes(),
ExtensionLibraries = BI.Expressions.Expression.ExtensionLibraryTypes()
Variables = Expression.StandardVariableTypes(),
ExtensionLibraries = Expression.ExtensionLibraryTypes()
};
// UI Extensions
@@ -151,7 +153,7 @@ namespace Disco.Web.Areas.Config.Controllers
var t = Type.GetType(type);
if (t != null)
{
return Json(BI.Expressions.ExpressionTypeDescriptor.Build(t, StaticDeclaredMembersOnly), JsonRequestBehavior.AllowGet);
return Json(ExpressionTypeDescriptor.Build(t, StaticDeclaredMembersOnly), JsonRequestBehavior.AllowGet);
}
else
{
@@ -1,11 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Disco.BI.DocumentTemplateBI.ManagedGroups;
using Disco.Data.Repository;
using Disco.Models.Repository;
using Disco.Models.UI.Config.DocumentTemplate;
using Disco.BI.DocumentTemplateBI.ManagedGroups;
using Disco.Services.Expressions;
using System.Collections.Generic;
using System.Linq;
namespace Disco.Web.Areas.Config.Models.DocumentTemplate
{
@@ -15,9 +14,9 @@ namespace Disco.Web.Areas.Config.Models.DocumentTemplate
public int StoredInstanceCount { get; set; }
public List<Disco.BI.Expressions.Expression> TemplateExpressions { get; set; }
public List<Expression> TemplateExpressions { get; set; }
public List<Disco.Models.Repository.JobType> JobTypes { get; set; }
public List<JobType> JobTypes { get; set; }
public List<string> Scopes
{
@@ -306,7 +306,7 @@
logHub = $.connection.logNotifications;
logHub.client.receiveLog = parseLog
$.connection.hub.qs = { LogModules: '@(Disco.BI.DocumentTemplateBI.DocumentsLog.Current.LiveLogGroupName)' };
$.connection.hub.qs = { LogModules: '@(Disco.Services.Documents.DocumentsLog.Current.LiveLogGroupName)' };
$.connection.hub.error(onHubFailed);
$.connection.hub.start()
@@ -2,7 +2,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34014
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -466,7 +466,7 @@ WriteLiteral(@"',
#line 309 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
Write(Disco.BI.DocumentTemplateBI.DocumentsLog.Current.LiveLogGroupName);
Write(Disco.Services.Documents.DocumentsLog.Current.LiveLogGroupName);
#line default
@@ -1,4 +1,4 @@
@model IEnumerable<Disco.BI.Expressions.Expression>
@model IEnumerable<Disco.Services.Expressions.Expression>
@{
Authorization.Require(Claims.Config.DocumentTemplate.Show);
}
@@ -2,7 +2,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34014
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -37,9 +37,9 @@ namespace Disco.Web.Areas.Config.Views.DocumentTemplate
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Areas/Config/Views/DocumentTemplate/_ExpressionsTable.cshtml")]
public partial class ExpressionsTable : Disco.Services.Web.WebViewPage<IEnumerable<Disco.BI.Expressions.Expression>>
public partial class _ExpressionsTable : Disco.Services.Web.WebViewPage<IEnumerable<Disco.Services.Expressions.Expression>>
{
public ExpressionsTable()
public _ExpressionsTable()
{
}
public override void Execute()
@@ -107,14 +107,14 @@ WriteLiteral(@">
#line hidden
WriteLiteral(" <tr>\r\n <td");
WriteAttribute("rowspan", Tuple.Create(" rowspan=\"", 719), Tuple.Create("\"", 754)
WriteAttribute("rowspan", Tuple.Create(" rowspan=\"", 725), Tuple.Create("\"", 760)
#line 24 "..\..\Areas\Config\Views\DocumentTemplate\_ExpressionsTable.cshtml"
, Tuple.Create(Tuple.Create("", 729), Tuple.Create<System.Object, System.Int32>(expressionParts.Length
, Tuple.Create(Tuple.Create("", 735), Tuple.Create<System.Object, System.Int32>(expressionParts.Length
#line default
#line hidden
, 729), false)
, 735), false)
);
WriteLiteral(">\r\n");