If you know how to fix the issue, make a pull request instead.
type GetBase64Function = (
cb?: string,
options?: string
) => void;
type GetBase64Params = (
options?: GetBase64Function
) => void;
interface TCreatedPdf {
download: CreatedPdfParams;
open: CreatedPdfParams;
print: CreatedPdfParams;
getBase64: GetBase64Params;
getBuffer: GetBase64Params;
}
I think it can resolve but I have no confidence..
@types/pdfmake package and had problems.Definitions by: in index.d.ts) so they can respond.If you do not mention the authors the issue will be ignored.
PageSize is undefined.
import * as pdfMake from 'pdfmake/build/pdfmake';
pdfMake.PageSize
is undefined
so. pdfMake.PageSize.A4 is error.
@shinriyo Thank you. I was wondering why pdfMake.PageSize.A4 threw error when adding pdf functionality to angular project.
This should be fixed after my pull request #42787 is merged. pdfmake.PageSize and pdfmake.PageOrientation were declared as enums, which is not accurate to the source library. Declaring an enum in TypeScript creates an actual runtime object, but this can't happen if the enum is declared in a type definition. pdfMake does not provide any PageSize object of any kind.
Most helpful comment
@shinriyo Thank you. I was wondering why pdfMake.PageSize.A4 threw error when adding pdf functionality to angular project.