Compare commits
2 Commits
f4549c0481
...
9245448d1c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9245448d1c | ||
|
|
a1bec774cd |
@@ -217,6 +217,21 @@ class Annotation {
|
|||||||
return await instance.delete(pageAnnotations);
|
return await instance.delete(pageAnnotations);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async validateAnnotations(instance: Instance): Promise<boolean> {
|
||||||
|
let pageAnnotations = (
|
||||||
|
await Promise.all(Array.from({ length: instance.totalPageCount }).map((_, pageIndex) =>
|
||||||
|
instance.getAnnotations(pageIndex)
|
||||||
|
))
|
||||||
|
).flatMap((annotations) =>
|
||||||
|
annotations.reduce((acc, annotation) => acc.concat(annotation), [])
|
||||||
|
).map((annotation: WidgetAnnotation) => {
|
||||||
|
console.log(annotation.toJS());
|
||||||
|
return annotation;
|
||||||
|
});
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
private createAnnotationFromElement(element: Element): [annotation: WidgetAnnotation, formField: SignatureFormFieldType] {
|
private createAnnotationFromElement(element: Element): [annotation: WidgetAnnotation, formField: SignatureFormFieldType] {
|
||||||
const id = PSPDFKit.generateInstantId()
|
const id = PSPDFKit.generateInstantId()
|
||||||
const width = this.inchToPoint(element.width)
|
const width = this.inchToPoint(element.width)
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ namespace EnvelopeGenerator.Web.Services
|
|||||||
}
|
}
|
||||||
public readonly ModelContainer? Models;
|
public readonly ModelContainer? Models;
|
||||||
|
|
||||||
public DatabaseService(IConfiguration Config, LoggingService Logging, DatabaseService database) : base(Config, Logging)
|
public DatabaseService(IConfiguration Config, LoggingService Logging) : base(Config, Logging)
|
||||||
{
|
{
|
||||||
logger = Logging.LogConfig.GetLogger();
|
logger = Logging.LogConfig.GetLogger();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user