feat(PDFBurner): add background rendering using PdfEditor before burning annotations
This commit is contained in:
parent
b62cca5961
commit
8db5afae40
@ -8,6 +8,7 @@ Imports DigitalData.Modules.Base
|
|||||||
Imports DigitalData.Modules.Logging
|
Imports DigitalData.Modules.Logging
|
||||||
Imports EnvelopeGenerator.CommonServices.Jobs.FinalizeDocument.FinalizeDocumentExceptions
|
Imports EnvelopeGenerator.CommonServices.Jobs.FinalizeDocument.FinalizeDocumentExceptions
|
||||||
Imports EnvelopeGenerator.Domain.Entities
|
Imports EnvelopeGenerator.Domain.Entities
|
||||||
|
Imports EnvelopeGenerator.PdfEditor
|
||||||
Imports GdPicture14
|
Imports GdPicture14
|
||||||
Imports Microsoft.EntityFrameworkCore
|
Imports Microsoft.EntityFrameworkCore
|
||||||
Imports Newtonsoft.Json
|
Imports Newtonsoft.Json
|
||||||
@ -44,6 +45,11 @@ Namespace Jobs.FinalizeDocument
|
|||||||
.Include(Function(sig) sig.Annotations) _
|
.Include(Function(sig) sig.Annotations) _
|
||||||
.ToList()
|
.ToList()
|
||||||
|
|
||||||
|
' Add background
|
||||||
|
Using doc As Pdf(Of MemoryStream, MemoryStream) = Pdf.FromMemory(pSourceBuffer)
|
||||||
|
pSourceBuffer = doc.Background(elements).ExportStream().ToArray()
|
||||||
|
End Using
|
||||||
|
|
||||||
Dim oResult As GdPictureStatus
|
Dim oResult As GdPictureStatus
|
||||||
Using oSourceStream As New MemoryStream(pSourceBuffer)
|
Using oSourceStream As New MemoryStream(pSourceBuffer)
|
||||||
' Open PDF
|
' Open PDF
|
||||||
|
|||||||
@ -2,11 +2,9 @@
|
|||||||
using iText.Kernel.Pdf.Canvas;
|
using iText.Kernel.Pdf.Canvas;
|
||||||
using EnvelopeGenerator.Domain.Interfaces;
|
using EnvelopeGenerator.Domain.Interfaces;
|
||||||
using iText.Kernel.Colors;
|
using iText.Kernel.Colors;
|
||||||
using iText.Kernel.Geom;
|
|
||||||
#if NETFRAMEWORK
|
#if NETFRAMEWORK
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user