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:
@@ -1,8 +1,10 @@
|
||||
using Disco.BI.Extensions;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Models.Services.Documents;
|
||||
using Disco.Models.Services.Jobs.JobLists;
|
||||
using Disco.Services;
|
||||
using Disco.Services.Authorization;
|
||||
using Disco.Services.Interop;
|
||||
using Disco.Services.Jobs.JobLists;
|
||||
using Disco.Services.Users;
|
||||
using Disco.Services.Web;
|
||||
@@ -1920,9 +1922,9 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
{
|
||||
var contentType = file.ContentType;
|
||||
if (string.IsNullOrEmpty(contentType) || contentType.Equals("unknown/unknown", StringComparison.OrdinalIgnoreCase))
|
||||
contentType = BI.Interop.MimeTypes.ResolveMimeType(file.FileName);
|
||||
contentType = MimeTypes.ResolveMimeType(file.FileName);
|
||||
|
||||
var ja = new Disco.Models.Repository.JobAttachment()
|
||||
var ja = new JobAttachment()
|
||||
{
|
||||
JobId = j.Id,
|
||||
TechUserId = CurrentUser.UserId,
|
||||
@@ -2096,7 +2098,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
{
|
||||
var timeStamp = DateTime.Now;
|
||||
Stream pdf;
|
||||
using (var generationState = Disco.Models.BI.DocumentTemplates.DocumentState.DefaultState())
|
||||
using (var generationState = DocumentState.DefaultState())
|
||||
{
|
||||
pdf = documentTemplate.GeneratePdf(Database, job, CurrentUser, timeStamp, generationState);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user