Good evening . if someone could give me a hand with this problem: I am trying to change the name of the file when downloading the pdf but I cannot I am using [filenameForDowload] as the documentation says but I am not able to solve it, I leave them as I have it encoded
angular.json
...
build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "www",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"assets": [
{
"glob": "**/*",
"input": "src/assets",
"output": "assets"
},
{
"glob": "**/*.svg",
"input": "node_modules/ionicons/dist/ionicons/svg",
"output": "./svg"
},
{
"glob": "web.config",
"input": "src/",
"output": "/"
},
{
"glob": "**/*",
"input": "node_modules/ngx-extended-pdf-viewer/bleeding-edge/",
"output": "/bleeding-edge/"
},
"src/manifest.webmanifest"
],
"styles": [
{
"input": "src/theme/variables.scss"
},
{
"input": "src/global.scss"
}
],
"scripts": []
},
app.module.ts
import { NgxExtendedPdfViewerModule } from 'ngx-extended-pdf-viewer';
..
imports: [
...
NgxExtendedPdfViewerModule,
],
...
my_componet.ts
import { NgxExtendedPdfViewerService } from 'ngx-extended-pdf-viewer';
import { pdfDefaultOptions } from 'ngx-extended-pdf-viewer';
...
constructor(
private ngxExtendedPdfViewerService: NgxExtendedPdfViewerService
) {
pdfDefaultOptions.assetsFolder = 'bleeding-edge';
}
my_html.html
...
<ngx-extended-pdf-viewer
[base64Src]="docBase64"
useBrowserLocale="true"
height="100vh"
[filenameForDownload]="filename"
></ngx-extended-pdf-viewer>
I do not know if it is a problem as I have it configured, but when I define a name it only returns the one that is by default document.pdf If someone could give me help with that, I would appreciate it
I was able to find where my problem was: I had to change my angular.json file ->
and in my_componet.ts change
And just now I was able to change the name of the document when downloading, it seems that something is not working well when you use bleeding-edge, or it is also very likely that I am doing something wrong, anyway I leave the way to solve it