Skip to content

LoadFromBase64

Updates the document content from Base64. The previously created content will be lost.

myWriter.LoadFromBase64(base64: string, type?: ( "pdf" | "docx" | "html" | "rtf" | "xml" | "txt" | ".pdf" | ".docx" | ".html" | ".rtf" | ".xml" | ".txt" )):void

Parameters

string base64

( "pdf" | "docx" | "html" | "rtf" | "xml" | "txt" | ".pdf" | ".docx" | ".html" | ".rtf" | ".xml" | ".txt" ) type optional

Remarks

Without type, the document library detects the input format. With type, the corresponding loader is forced. Invalid Base64, an unreadable document, or an unsupported explicit type throws.

Load document content from a Base64 string

1
2
var writer = new Writer();
writer.LoadFromBase64('PGh0bWw...');