angular-pdf-forms icon indicating copy to clipboard operation
angular-pdf-forms copied to clipboard

Property values 'fieldType' and 'ButtonValue' does not exist in PDFAnnotation Data

Open drexelapplab opened this issue 7 years ago • 3 comments

I'm currently trying to run your code but I'm coming across this error in my terminal whenever I try to run my website. I've already downloaded the npm package for pdfjs-dist and I don't see within their files of anything labeled, "PDFAnnotationData". Am I missing another installation or package?

ERROR in src/app/pdf/pdf.component.ts(30,54): error TS2339: Property 'buttonValue' does not exist on type 'PDFAnnotationData'. src/app/pdf/pdf.component.ts(33,33): error TS2339: Property 'fieldName' does not exist on type 'PDFAnnotationData'. src/app/pdf/pdf.component.ts(35,24): error TS2339: Property 'fieldType' does not exist on type 'PDFAnnotationData'. src/app/pdf/pdf.component.ts(37,38): error TS2339: Property 'buttonValue' does not exist on type 'PDFAnnotationData'. src/app/pdf/pdf.component.ts(40,24): error TS2339: Property 'fieldType' does not exist on type 'PDFAnnotationData'. src/app/pdf/pdf.component.ts(40,59): error TS2339: Property 'checkBox' does not exist on type 'PDFAnnotationData'. src/app/pdf/pdf.component.ts(42,38): error TS2339: Property 'buttonValue' does not exist on type 'PDFAnnotationData'. src/app/pdf/pdf.component.ts(45,24): error TS2339: Property 'checkBox' does not exist on type 'PDFAnnotationData'. src/app/pdf/pdf.component.ts(48,54): error TS2339: Property 'buttonValue' does not exist on type 'PDFAnnotationData'. src/app/pdf/pdf.component.ts(65,43): error TS2339: Property 'fieldName' does not exist on type 'PDFAnnotationData'.

drexelapplab avatar Aug 15 '18 12:08 drexelapplab

I have the same issue :( It's now the 21st November 2018 :(

robeverett avatar Nov 21 '18 09:11 robeverett

So do you got any solution to this issue? I am sure you must have. Please try to share

ushawadhwani avatar Apr 09 '19 06:04 ushawadhwani

Comment out //import { PDFAnnotationData } from 'pdfjs-dist';

and add the below to your typings.d.ts file:

interface PDFAnnotationData { alternativeText: string; annotationFlags: number; annotationType: number; buttonValue: any; borderStyle: { width: number, style: number, dashArray: any[], horizontalCornerRadius: number, verticalCornerRadius: number }; color: number[]; comb: boolean; checkBox: boolean; defaultAppearance: string; fieldFlags: number; fieldName: string; fieldType: string; fieldValue: any; hasAppearance: boolean; id: string; maxLen: null | number; multiLine: boolean; readOnly: boolean; rect: number[]; subtype: string; textAlignment: number; }

CameronDNA avatar Jul 03 '19 16:07 CameronDNA