Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
412 views
in Technique[技术] by (71.8m points)

On code deployment, the ng2-pdfjs-viewer icons print and download show - though they are set to false. At localhost they're not visible

I noticed the author of ng2-pdfjs-viewer PDF viewer answers questions here. Having an issue with my deployed code of PDF viewer, all is fine at localhost but once the code is deployed to a server, the download and print buttons are reappearing.

It's the print and download buttons I'm trying to remove from the viewer, any suggestions, please.

In my TS file:

@Input() print: boolean = false;
@Input() download: boolean = false;

In my HTML file:

 <ng2-pdfjs-viewer 
    #pdfViewerOnDemand
    [externalWindow]="true"
    [downloadFileName]="'mytestfile.pdf'"
    [openFile]="false"
    [viewBookmark]="false"
    [download]="false"
    [print]="false">
 </ng2-pdfjs-viewer>

The package installed is the most recent version: 5.0.7.

Looking into Mozilla's PDF.JS, as it uses this behind the scenes.

question from:https://stackoverflow.com/questions/66048540/on-code-deployment-the-ng2-pdfjs-viewer-icons-print-and-download-show-though

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...