diff --git a/EnvelopeGenerator.Common/Helpers.vb b/EnvelopeGenerator.Common/Helpers.vb index b9fbf33c..d5290ad5 100644 --- a/EnvelopeGenerator.Common/Helpers.vb +++ b/EnvelopeGenerator.Common/Helpers.vb @@ -26,9 +26,7 @@ Public Shared Function GetEnvelopeURL(pHost As String, pEnvelopeUuid As String, pReceiverSignature As String) As String Dim oEnvelopeUserReference As String = EncodeEnvelopeReceiverId(pEnvelopeUuid, pReceiverSignature) - - Dim oURL As String = "" - oURL = String.Format("{0}/EnvelopeKey/{1}", pHost.Trim(), oEnvelopeUserReference) + Dim oURL As String = String.Format("{0}/EnvelopeKey/{1}", pHost.Trim(), oEnvelopeUserReference) Return oURL End Function diff --git a/EnvelopeGenerator.Web/Handler/FileHandler.cs b/EnvelopeGenerator.Web/Handler/FileHandler.cs index af48fb39..36228c97 100644 --- a/EnvelopeGenerator.Web/Handler/FileHandler.cs +++ b/EnvelopeGenerator.Web/Handler/FileHandler.cs @@ -1,5 +1,7 @@ using EnvelopeGenerator.Common; +using EnvelopeGenerator.Common.My.Resources; using EnvelopeGenerator.Web.Services; +using Microsoft.Extensions.Primitives; namespace EnvelopeGenerator.Web.Handler { @@ -7,6 +9,7 @@ namespace EnvelopeGenerator.Web.Handler { public async static Task HandleFile(HttpContext ctx, DatabaseService database, LoggingService logging) { + var logger = logging.LogConfig.GetLogger("FileHandler"); string envelopeKey = (string)ctx.Request.RouteValues["envelopeKey"]; @@ -22,12 +25,52 @@ namespace EnvelopeGenerator.Web.Handler logger.Info("Contains [{0}] documents", envelope.Documents.Count); logger.Info("Contains [{0}] receivers", envelope.Receivers.Count); + int documentId = getDocumentIndex(ctx); + var document = getDocument(envelope, documentId); + + try + { + var bytes = await File.ReadAllBytesAsync(document.Filepath); + logger.Info("Serving file, size: [{0}]", bytes.Length); + + return Results.File(bytes); + } + catch (Exception e) + { + logger.Error(e); + return Results.Problem(); + + } + } + + private static int getDocumentIndex(HttpContext ctx) + { + int documentId = 0; + StringValues documentIndexString; + if (ctx.Request.Query.TryGetValue("index", out documentIndexString)) + { + int.TryParse(documentIndexString.First(), out documentId); + } + + return documentId; + } + + private static EnvelopeDocument getDocument(Common.Envelope envelope, int documentId) + { var document = envelope.Documents.First(); - var bytes = await File.ReadAllBytesAsync(document.Filepath); - logger.Info("Serving file, size: [{0}]", bytes.Length); + if (documentId > 0) + { + var documentById = envelope.Documents. + Where(d => d.Id == documentId). + FirstOrDefault(); - return Results.File(bytes); + if (documentById != null) + { + document = documentById; + } + } + return document; } public static Task HandleGetData(HttpContext ctx, DatabaseService database, LoggingService logging) diff --git a/EnvelopeGenerator.Web/Scripts/app.ts b/EnvelopeGenerator.Web/Scripts/app.ts index 1f2039c2..87f73ffe 100644 --- a/EnvelopeGenerator.Web/Scripts/app.ts +++ b/EnvelopeGenerator.Web/Scripts/app.ts @@ -1,5 +1,6 @@ import PSPDFKitType, { AnnotationsUnion } from "./index"; import { Instance, WidgetAnnotation, ToolbarItem } from "./index"; +import { EnvelopeResponse, Envelope, User, Element, Document } from "./interfaces"; declare const PSPDFKit: typeof PSPDFKitType @@ -9,63 +10,67 @@ const { SignatureFormField } = PSPDFKit.FormFields; const { DRAW, TYPE } = PSPDFKit.ElectronicSignatureCreationMode; const { DISABLED } = PSPDFKit.AutoSaveMode; -interface EnvelopeResponse { - receiverId: number; - envelope: Envelope; -} - -interface Envelope { - id: number; - userId: number; - title: string; - contractType: number; - status: number; - uuid: string; -} - -class Settings { - public static allowedToolbarItems: string[] = [ - "sidebar-thumbnails", - "sidebar-document-ouline", - "sidebar-bookmarks", - "pager", - "pan", - "zoom-out", - "zoom-in", - "zoom-mode", - "spacer", - "search" - ] -} +const allowedToolbarItems: string[] = [ + "sidebar-thumbnails", + "sidebar-document-ouline", + "sidebar-bookmarks", + "pager", + "pan", + "zoom-out", + "zoom-in", + "zoom-mode", + "spacer", + "search" +] export class App { public static Instance: Instance; + public static currentDocument // This function will be called in the ShowEnvelope.razor page // and will trigger loading of the Editor Interface public static async loadPDFFromUrl (container: string, envelopeKey: string) { console.debug("Loading PSPDFKit.."); - const arrayBuffer = await App.loadDocument(`/api/download/${envelopeKey}`); const envelopeObject: EnvelopeResponse = await App.loadData(`/api/get-data/${envelopeKey}`); + const document: Document = envelopeObject.envelope.documents[0]; + + let arrayBuffer + try { + arrayBuffer = await App.loadDocument(`/api/download/${envelopeKey}?id=${document.id}`); + } catch (e) { + console.error(e) + } App.Instance = await App.loadPSPDFKit(arrayBuffer, container) App.configurePSPDFKit(this.Instance) - console.debug(envelopeObject.envelope.id); + console.debug(envelopeObject.envelope); console.debug("PSPDFKit configured!"); - const id = PSPDFKit.generateInstantId() - const annotation: WidgetAnnotation = App.createSignatureAnnotation(id, 150, 50, 50, 50, 0) + const annotations: any[] = []; - const formField = new SignatureFormField({ - name: id, - annotationIds: List([annotation.id]) - }) + document.elements.forEach(function (element: Element) { + console.log("Loading element") + console.debug("Page", element.page) + console.debug("Width / Height", element.width, element.height) + console.debug("Top / Left", element.top, element.left) - console.debug("Annotation created.") + const id = PSPDFKit.generateInstantId() + const annotation: WidgetAnnotation = App.createSignatureAnnotation(id, element.width, element.height, element.top, element.left, element.page) - const [createdAnnotation] = await App.Instance.create([annotation, formField]) + const formField = new SignatureFormField({ + name: id, + annotationIds: List([annotation.id]) + }) + + annotations.push(annotation); + annotations.push(formField); + + console.debug("Annotation created.") + }) + + const [createdAnnotation] = await App.Instance.create(annotations) console.debug(createdAnnotation) } @@ -117,7 +122,8 @@ export class App { }) const filteredItems: Array = instance.toolbarItems - .filter((item) => Settings.allowedToolbarItems.includes(item.type)) + .filter((item) => allowedToolbarItems.includes(item.type)) + const customItems: ToolbarItem[] = [ { @@ -171,17 +177,12 @@ export class App { } - private static createSignatureAnnotation(id: string, x: number, y: number, top: number, left: number, pageIndex: number): WidgetAnnotation { + private static createSignatureAnnotation(id: string, width: number, height: number, top: number, left: number, pageIndex: number): WidgetAnnotation { const annotation = new PSPDFKit.Annotations.WidgetAnnotation({ id: id, pageIndex: pageIndex, formFieldName: id, - boundingBox: new Rect({ - width: x, - height: y, - top: top, - left: left - }) + boundingBox: new Rect({ width, height, top, left }) }) return annotation diff --git a/EnvelopeGenerator.Web/Scripts/interfaces.ts b/EnvelopeGenerator.Web/Scripts/interfaces.ts new file mode 100644 index 00000000..351d04a5 --- /dev/null +++ b/EnvelopeGenerator.Web/Scripts/interfaces.ts @@ -0,0 +1,47 @@ +interface EnvelopeResponse { + receiverId: number; + envelope: Envelope; +} + +interface Envelope { + id: number; + userId: number; + title: string; + status: number; + statusTranslated: string; + contractType: number; + contractTypeTranslated: string; + subject: string; + uuid: string; + user: User; + documents: Document[]; +} + +interface Document { + id: number; + filepath: string; + filename: string; + elements: Element[]; +} + +interface Element { + id: number; + left: number; + top: number; + width: number; + height: number; + page: number; + readOnly: boolean; +} + +interface User { + id: number; + email: string; + name: string; + prename: string; + username: string; + language: string; + fullName: string; +} + +export { EnvelopeResponse, Envelope, Document, Element, User } \ No newline at end of file diff --git a/EnvelopeGenerator.Web/tsconfig.json b/EnvelopeGenerator.Web/tsconfig.json index 915d6f50..12f9c4ea 100644 --- a/EnvelopeGenerator.Web/tsconfig.json +++ b/EnvelopeGenerator.Web/tsconfig.json @@ -9,7 +9,7 @@ "moduleResolution": "Classic", "sourceMap": true, "target": "es5", - "lib": ["ES2016", "DOM"] + "lib": [ "ES2016", "DOM" ] }, "include": [ "Scripts/**/*.ts" diff --git a/EnvelopeGenerator.Web/tsconfig.original.json b/EnvelopeGenerator.Web/tsconfig.original.json new file mode 100644 index 00000000..915d6f50 --- /dev/null +++ b/EnvelopeGenerator.Web/tsconfig.original.json @@ -0,0 +1,20 @@ +{ + "compileOnSave": true, + "compilerOptions": { + "noEmitOnError": true, + "noImplicitAny": false, + "outDir": "wwwroot/js", + "removeComments": false, + "module": "ES2015", + "moduleResolution": "Classic", + "sourceMap": true, + "target": "es5", + "lib": ["ES2016", "DOM"] + }, + "include": [ + "Scripts/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} diff --git a/EnvelopeGenerator.Web/wwwroot/js/app.js b/EnvelopeGenerator.Web/wwwroot/js/app.js index e86d27f4..83e772ce 100644 --- a/EnvelopeGenerator.Web/wwwroot/js/app.js +++ b/EnvelopeGenerator.Web/wwwroot/js/app.js @@ -39,23 +39,18 @@ var Rect = PSPDFKit.Geometry.Rect; var SignatureFormField = PSPDFKit.FormFields.SignatureFormField; var _a = PSPDFKit.ElectronicSignatureCreationMode, DRAW = _a.DRAW, TYPE = _a.TYPE; var DISABLED = PSPDFKit.AutoSaveMode.DISABLED; -var Settings = /** @class */ (function () { - function Settings() { - } - Settings.allowedToolbarItems = [ - "sidebar-thumbnails", - "sidebar-document-ouline", - "sidebar-bookmarks", - "pager", - "pan", - "zoom-out", - "zoom-in", - "zoom-mode", - "spacer", - "search" - ]; - return Settings; -}()); +var allowedToolbarItems = [ + "sidebar-thumbnails", + "sidebar-document-ouline", + "sidebar-bookmarks", + "pager", + "pan", + "zoom-out", + "zoom-in", + "zoom-mode", + "spacer", + "search" +]; var App = /** @class */ (function () { function App() { } @@ -63,33 +58,52 @@ var App = /** @class */ (function () { // and will trigger loading of the Editor Interface App.loadPDFFromUrl = function (container, envelopeKey) { return __awaiter(this, void 0, void 0, function () { - var arrayBuffer, envelopeObject, _a, id, annotation, formField, createdAnnotation; + var envelopeObject, document, arrayBuffer, e_1, _a, annotations, createdAnnotation; return __generator(this, function (_b) { switch (_b.label) { case 0: console.debug("Loading PSPDFKit.."); - return [4 /*yield*/, App.loadDocument("/api/download/".concat(envelopeKey))]; - case 1: - arrayBuffer = _b.sent(); return [4 /*yield*/, App.loadData("/api/get-data/".concat(envelopeKey))]; - case 2: + case 1: envelopeObject = _b.sent(); + document = envelopeObject.envelope.documents[0]; + _b.label = 2; + case 2: + _b.trys.push([2, 4, , 5]); + return [4 /*yield*/, App.loadDocument("/api/download/".concat(envelopeKey, "?id=").concat(document.id))]; + case 3: + arrayBuffer = _b.sent(); + return [3 /*break*/, 5]; + case 4: + e_1 = _b.sent(); + console.error(e_1); + return [3 /*break*/, 5]; + case 5: _a = App; return [4 /*yield*/, App.loadPSPDFKit(arrayBuffer, container)]; - case 3: + case 6: _a.Instance = _b.sent(); App.configurePSPDFKit(this.Instance); - console.debug(envelopeObject.envelope.id); + console.debug(envelopeObject.envelope); console.debug("PSPDFKit configured!"); - id = PSPDFKit.generateInstantId(); - annotation = App.createSignatureAnnotation(id, 150, 50, 50, 50, 0); - formField = new SignatureFormField({ - name: id, - annotationIds: List([annotation.id]) + annotations = []; + document.elements.forEach(function (element) { + console.log("Loading element"); + console.debug("Page", element.page); + console.debug("Width / Height", element.width, element.height); + console.debug("Top / Left", element.top, element.left); + var id = PSPDFKit.generateInstantId(); + var annotation = App.createSignatureAnnotation(id, element.width, element.height, element.top, element.left, element.page); + var formField = new SignatureFormField({ + name: id, + annotationIds: List([annotation.id]) + }); + annotations.push(annotation); + annotations.push(formField); + console.debug("Annotation created."); }); - console.debug("Annotation created."); - return [4 /*yield*/, App.Instance.create([annotation, formField])]; - case 4: + return [4 /*yield*/, App.Instance.create(annotations)]; + case 7: createdAnnotation = (_b.sent())[0]; console.debug(createdAnnotation); return [2 /*return*/]; @@ -137,12 +151,12 @@ var App = /** @class */ (function () { console.log("annotations created", createdAnnotations.toJS()); }); var filteredItems = instance.toolbarItems - .filter(function (item) { return Settings.allowedToolbarItems.includes(item.type); }); + .filter(function (item) { return allowedToolbarItems.includes(item.type); }); var customItems = [ { type: "custom", id: "button-finish", - title: "Abschließen", + title: "Abschlie�en", icon: "\n \n \n ", onPress: this.handleFinish } @@ -201,17 +215,12 @@ var App = /** @class */ (function () { }); }); }; - App.createSignatureAnnotation = function (id, x, y, top, left, pageIndex) { + App.createSignatureAnnotation = function (id, width, height, top, left, pageIndex) { var annotation = new PSPDFKit.Annotations.WidgetAnnotation({ id: id, pageIndex: pageIndex, formFieldName: id, - boundingBox: new Rect({ - width: x, - height: y, - top: top, - left: left - }) + boundingBox: new Rect({ width: width, height: height, top: top, left: left }) }); return annotation; }; diff --git a/EnvelopeGenerator.Web/wwwroot/js/app.js.map b/EnvelopeGenerator.Web/wwwroot/js/app.js.map index c6da3ddd..a40835e4 100644 --- a/EnvelopeGenerator.Web/wwwroot/js/app.js.map +++ b/EnvelopeGenerator.Web/wwwroot/js/app.js.map @@ -1 +1 @@ -{"version":3,"file":"app.js","sourceRoot":"","sources":["../../Scripts/app.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKQ,IAAA,IAAI,GAAK,QAAQ,CAAC,SAAS,KAAvB,CAAwB;AAC5B,IAAA,IAAI,GAAK,QAAQ,CAAC,QAAQ,KAAtB,CAAuB;AAC3B,IAAA,kBAAkB,GAAK,QAAQ,CAAC,UAAU,mBAAxB,CAAyB;AAC7C,IAAA,KAAiB,QAAQ,CAAC,+BAA+B,EAAvD,IAAI,UAAA,EAAE,IAAI,UAA6C,CAAC;AACxD,IAAA,QAAQ,GAAK,QAAQ,CAAC,YAAY,SAA1B,CAA2B;AAgB3C;IAAA;IAaA,CAAC;IAZiB,4BAAmB,GAAa;QAC1C,oBAAoB;QACpB,yBAAyB;QACzB,mBAAmB;QACnB,OAAO;QACP,KAAK;QACL,UAAU;QACV,SAAS;QACT,WAAW;QACX,QAAQ;QACR,QAAQ;KACX,CAAA;IACL,eAAC;CAAA,AAbD,IAaC;AAED;IAAA;IAqJA,CAAC;IAlJG,8DAA8D;IAC9D,mDAAmD;IAC/B,kBAAc,GAAlC,UAAoC,SAAiB,EAAE,WAAmB;;;;;;wBACtE,OAAO,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;wBAEhB,qBAAM,GAAG,CAAC,YAAY,CAAC,wBAAiB,WAAW,CAAE,CAAC,EAAA;;wBAApE,WAAW,GAAG,SAAsD;wBACjC,qBAAM,GAAG,CAAC,QAAQ,CAAC,wBAAiB,WAAW,CAAE,CAAC,EAAA;;wBAArF,cAAc,GAAqB,SAAkD;wBAE3F,KAAA,GAAG,CAAA;wBAA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B,WAAW,EAAE,IAAI,IAAI,CAAC,EAAE,KAAK,OAAA,EAAE,MAAM,QAAA,EAAE,GAAG,KAAA,EAAE,IAAI,MAAA,EAAE,CAAC;SACtD,CAAC,CAAA;QAEF,OAAO,UAAU,CAAA;IACrB,CAAC;IAEL,UAAC;AAAD,CAAC,AArKD,IAqKC"} \ No newline at end of file diff --git a/EnvelopeGenerator.Web/wwwroot/js/interfaces.js b/EnvelopeGenerator.Web/wwwroot/js/interfaces.js new file mode 100644 index 00000000..c30bb68c --- /dev/null +++ b/EnvelopeGenerator.Web/wwwroot/js/interfaces.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=interfaces.js.map \ No newline at end of file diff --git a/EnvelopeGenerator.Web/wwwroot/js/interfaces.js.map b/EnvelopeGenerator.Web/wwwroot/js/interfaces.js.map new file mode 100644 index 00000000..26ed44ab --- /dev/null +++ b/EnvelopeGenerator.Web/wwwroot/js/interfaces.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../Scripts/interfaces.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/EnvelopeGenerator.Web/wwwroot/js/settings.js b/EnvelopeGenerator.Web/wwwroot/js/settings.js index 293b694f..008c86b3 100644 --- a/EnvelopeGenerator.Web/wwwroot/js/settings.js +++ b/EnvelopeGenerator.Web/wwwroot/js/settings.js @@ -1 +1,14 @@ +const allowedToolbarItems = [ + "sidebar-thumbnails", + "sidebar-document-ouline", + "sidebar-bookmarks", + "pager", + "pan", + "zoom-out", + "zoom-in", + "zoom-mode", + "spacer", + "search" +]; +export { allowedToolbarItems }; //# sourceMappingURL=settings.js.map \ No newline at end of file diff --git a/EnvelopeGenerator.Web/wwwroot/js/settings.js.map b/EnvelopeGenerator.Web/wwwroot/js/settings.js.map index 5597a3da..223da3ef 100644 --- a/EnvelopeGenerator.Web/wwwroot/js/settings.js.map +++ b/EnvelopeGenerator.Web/wwwroot/js/settings.js.map @@ -1 +1 @@ -{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../Scripts/settings.ts"],"names":[],"mappings":""} \ No newline at end of file +{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../Scripts/settings.ts"],"names":[],"mappings":"AAAA,MAAM,mBAAmB,GAAa;IAClC,oBAAoB;IACpB,yBAAyB;IACzB,mBAAmB;IACnB,OAAO;IACP,KAAK;IACL,UAAU;IACV,SAAS;IACT,WAAW;IACX,QAAQ;IACR,QAAQ;CACX,CAAA;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAA"} \ No newline at end of file