# server side annotation merging

**URL:** <https://pdfjs.community/t/server-side-annotation-merging/167>\
**Category:** Technical Support\
**Tags:** pdfjs-express\
**Created:** [July 28, 2020, 3:21pm UTC](https://pdfjs.community/t/server-side-annotation-merging/167 "2020-07-28T15:21:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ctamrakar](https://avatars.discourse-cdn.com/v4/letter/c/b4bc9f/32.png) [@ctamrakar](https://pdfjs.community/u/ctamrakar)\
**Post date:** [July 28, 2020, 3:21pm UTC](https://pdfjs.community/t/server-side-annotation-merging/167/1 "2020-07-28T15:21:13Z")

</div>

Currently we are evaluating pdf.js express to view and redact documents  
what is the recommended approach to burn redaction done on by pdf.js express  
permanently on the PDF at server side

we are looking preferably server side APIs such as .NET so that we can write our own web APIs

---

<div class="post-metadata">

**Author:** ![Logan](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/logan/32/13_2.png) [@Logan](https://pdfjs.community/u/Logan)\
**Post date:** [July 28, 2020, 3:30pm UTC](https://pdfjs.community/t/server-side-annotation-merging/167/2 "2020-07-28T15:30:37Z")

</div>

Hi there!

Express does not offer redaction support (even on the client), but you might want to check out our sister product, [PDFTron WebViewer](https://www.pdftron.com/webviewer/). It offers full client side redaction support and many other features that are not included in Express. Doing everything on the client is cheaper much more scalable as you do not need to setup and maintain a server.

If you still want to do it server side, PDFTron also has a [.NET SDK](https://www.pdftron.com/documentation/dotnet/) that can do redaction on the server.

If you wanted to combine Express with the .NET SDK I linked above, you could implement your own client side redaction tool (by just extending a rectangle annotation) and then convert that annotation to a redaction on the server. If you choose to go this route, we could provide guidance on the implementation.

I hope this help! Let me know if you have any more questions.

Logan

---

<div class="post-metadata">

**Author:** ![ctamrakar](https://avatars.discourse-cdn.com/v4/letter/c/b4bc9f/32.png) [@ctamrakar](https://pdfjs.community/u/ctamrakar)\
**Post date:** [August 5, 2020, 9:04am UTC](https://pdfjs.community/t/server-side-annotation-merging/167/3 "2020-08-05T09:04:36Z")

</div>

Thanks for the response  
We would like to try out [PDFjs.express](http://PDFjs.express) on the client side + PDFtron server side as we would need a redaction done  
on the browser side as well as server side

we’ll like to go with [PDFJs.express](http://PDFJs.express) as we’ll just need a PDF viewer + redactions . So let us know if we do following approach  
_\>f you wanted to combine Express with the .NET SDK I linked above, you could implement your own client side redaction tool (by just extending a rectangle annotation) and then convert that annotation to a redaction on the server. If you choose to go this route, we could provide guidance on the implementation._

---

<div class="post-metadata">

**Author:** ![Logan](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/logan/32/13_2.png) [@Logan](https://pdfjs.community/u/Logan)\
**Post date:** [August 6, 2020, 2:43pm UTC](https://pdfjs.community/t/server-side-annotation-merging/167/4 "2020-08-06T14:43:53Z")

</div>

Hi there!

Yes, that approach should work. You can try out both PDFTron SDK and Express for free, so you should be able to get a POC going.

If you have any questions about the PDFTron SDK, you can reach out to the [PDF solution engineers team](https://www.pdftron.com/form/trial-support/) and they will be able to help you out.

Once you’re ready to purchase, you should contact the [PDFTron sales team](https://www.pdftron.com/form/contact-sales/) to discuss pricing of their SDK.

Thanks,  
Logan

---

<div class="post-metadata">

**Author:** ![ctamrakar](https://avatars.discourse-cdn.com/v4/letter/c/b4bc9f/32.png) [@ctamrakar](https://pdfjs.community/u/ctamrakar)\
**Post date:** [September 3, 2020, 11:57am UTC](https://pdfjs.community/t/server-side-annotation-merging/167/5 "2020-09-03T11:57:50Z")

</div>

Hi thereActually we are trying to see if we can license pdfJsexpress only and then create a custom rectangle annotation which will be saved in  
XFDF format

Do we have sample snippets on how we can implement them in Angular ( TypeScript ) ?

Looking forward for your response.

---

<div class="post-metadata">

**Author:** ![Logan](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/logan/32/13_2.png) [@Logan](https://pdfjs.community/u/Logan)\
**Post date:** [September 3, 2020, 2:23pm UTC](https://pdfjs.community/t/server-side-annotation-merging/167/6 "2020-09-03T14:23:15Z")

</div>

Hi,

Yes you can create custom annotations in PDF.js Express and save them as XFDF.

If you want to bake them into the document, you could use our [rest api](https://pdfjs.express/documentation/utils).

We do not have Angular specific examples (PDF.js Express works with any framework), but here are a few guides/examples that should help:

- [Creating custom annotations](https://pdfjs.express/documentation/annotation/custom-annotations)
- [Custom annot sample](https://www.pdftron.com/documentation/samples/js/custom-annotations/) (This is on PDFTron website but the API is the exact same)

We also plan on adding some better samples and guides regarding custom annotations in the future.

If you have any further questions please let us know!

Thanks,  
Logan

---

<div class="post-metadata">

**Author:** ![ctamrakar](https://avatars.discourse-cdn.com/v4/letter/c/b4bc9f/32.png) [@ctamrakar](https://pdfjs.community/u/ctamrakar)\
**Post date:** [September 7, 2020, 7:28am UTC](https://pdfjs.community/t/server-side-annotation-merging/167/7 "2020-09-07T07:28:56Z")

</div>

Hi

Thanks for your response

We tried out a code snippet for pdf js express as following and it seems to show the redaction icon in WebViewer .

So following is my question

1. Will the following functionality need PDFTron License ?
2. can we have details of redaction ( coordinates ) in an XFDF file with following functionality ?

we could then use 3rd party SDK to burn redaction based on XFDF informations .

We could not get custom annotation worked for Angular ,please do let us know if you have any working sample for typescript

WebViewer(  
{  
path: “…/lib/public”,  
enableRedaction: true,  
},  
this.viewer.nativeElement  
);

Thanks  
Chandan

---

<div class="post-metadata">

**Author:** ![Logan](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/logan/32/13_2.png) [@Logan](https://pdfjs.community/u/Logan)\
**Post date:** [September 8, 2020, 2:23pm UTC](https://pdfjs.community/t/server-side-annotation-merging/167/8 "2020-09-08T14:23:41Z")

</div>

Hi!

If your workflow is creating rectangle annotations on the client, and converting them to redactions on the server using a 3rd party SDK, then no you will not need a PDFTron license, just a PDF.js Express one.

As a side note, the `enableRedaction: true` option will not work in Express.

Express does not ship with Typescript definitions so no we do not have an angular typescript sample. We do however have a simple [angular sample](https://github.com/pdfjs-express/pdfjs-express-angularjs-sample).

Thanks!  
Logan
