Base solution for your next web application
Open Closed

Edit pdfs embedded in browsers like edge #11269


User avatar
0
ipservant created
  • What is your product version? -> 8.4
  • What is your product type (Angular or MVC)? -> Angular
  • What is product framework type (.net framework or .net core)? -> .net core

Hi, We added some binary fields to our data model which may contain pdf files and are passed into the frontend as base64 like so:

this._xxxServiceProxy.getFileBytes(result.objekt.id)
                        .subscribe(result => {
                            if (result) {
                                this.display = this._sanitizer.bypassSecurityTrustResourceUrl('data:application/pdf;base64,' + result);
                            }
                        });
<div class="form-group" *ngIf="display">
    <object [(data)]="display" *ngIf="objekte?.extension?.toLowerCase() === 'pdf'" style="width:100%;height:600px" type="application/pdf">
    </object>
</div>

So far so good (except there are issues with bigger pdf files, but inserting them as iframe with another approach in the front-end works fine also.

Now the question is, as some browsers offer to comment pdfs in their embedded views, is there a possibility to access the updated pdf/base64 data (this.display here) to pass the update back to the server side?

this.display seems to keep the old value without the comment. With an iframe approach it seems even harder to access the updated data from the browser...

Thanks for any ideas!


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @ips-ad

    Unfortunately we don't have any experience on this. Maybe you can find a library on GitHub for PDF editing.