Apex Designer Documentation
What's New
Getting Started
Projects
Business Objects
Processes
User Interfaces
App Behaviors
Files
Dependencies
Project Settings
Libraries
Patterns and Best Practices
App Showcase
Frequently Asked Questions

Manage PDFs

See how to manage PDFs in an Apex Designer app

Blank Profile Image
Written by David Knapp
Updated 2 years ago
Less than a minute read

This video shows you how to manage binary data (PDF files in this case) in an Apex Designer app:

 

Here is the upload behavior code snippet:

const file = this.fileUploadInput.nativeElement.files[0];
debug('file', file);

let reader: FileReader = new FileReader();

reader.onload = async () => {
	debug('reader.result', reader.result);

	const base64 = ('' + reader.result).substr(('data:' + file.type + ';base64,').length);
	debug('base64', base64);

	await this.pdfDocuments.add({
		fileName: file.name,
		size: file.size,
		base64Content: base64
	});

	this.fileUploadInput.value = null;

	await this.pdfDocuments.read();
};

reader.readAsDataURL(file);

This video shows you how to view PDFs in an Apex Designer app:

 

Powered by Apex Designer
Terms of ServicePrivacy Policy
© 2017-2024 Apex Process Consultants