Forum › How do I...?

PrinceXML support for angular components

sai
Hi Team,

I am currently doing one POC to convert a page developed in angular to pdf by providing hosted url but its giving blank pdf. but same it is working if i give any aspx pages.

Angular version :v16

Does princexml support pages developed using angular?
mikeday
Angular may be using DOM features that Prince does not currently support, do you have a test document we could examine?
sai
HI Mike,

For our angular application I see error message:
msg|err|<our hosted url>/scripts.fea45ecb75a30d8b.js:10723|unexpected token reserved("const")

For testing purpose, we used 2 urls:
1. https://angular.io/quick-start
output: blank pdf
error message: TypeError: undefined not an object.

2. https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Introduction
output: pdf generated with page content.

Attached the outputs
  1. output.pdf‎ 2.1 kB ‎
    blank pdf
  2. output1.pdf‎ 96.0 kB ‎
    content pdf

Edited by sai

mikeday
Which version of Prince are you using? Prince 15 added support for const, and the latest builds have more JavaScript support.