Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

129
Views
¿Por qué algunos de los archivos PDF no se muestran en mi aplicación Angular?

Estoy tratando de mostrar el archivo PDF en mi aplicación usando un paquete, "ng2-pdf-viewer" y usé la URL del PDF que me proporcionaron para las pruebas que funcionó bien.

Pero luego, traté de renderizar otro archivo PDF, no mostró nada, un espacio en blanco.

Este es el código: [En app.component.html]

 <pdf-viewer [src]="pdfSource" [render-text]="true" style="display: block;"

[En aplicación.componente.ts]

 import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { pdfSource = {url: 'https://www.orimi.com/pdf-test.pdf', withCredentials: false} }

[En app.module.ts]

 import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { MathjaxModule } from 'mathjax-angular'; import { PdfViewerModule } from 'ng2-pdf-viewer'; @NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, AppRoutingModule, NgbModule, MathjaxModule.forRoot(), PdfViewerModule ], providers: [], bootstrap: [AppComponent] }) export class AppModule { }

Este es el enlace del paquete que estoy usando: "https://www.npmjs.com/package/ng2-pdf-viewer"

Y la URL de PDF que funcionó es esta: "https://vadimdez.github.io/ng2-pdf-viewer/assets/pdf-test.pdf"

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!