šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

base64topdf

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

base64topdf

base64topdf

1.1.8
latest
Source
npm
Version published
Weekly downloads
9.1K
29.68%
Maintainers
1
Weekly downloads
Ā 
Created
Source

base64topdf

Here we are going to convert the base64 content to pdf and neither converts the pdf to base64. Also we can convert rtfText to plain text and vise versa.

Importing

const base64 = require('base64topdf');

Using npm:

$ npm i -g npm
$ npm i --save base64topdf

Why base64topdf?

Its easy to use and we can convert the pdf as base64 content and vise versa.
* We can convert RTF content to base64.
* We can convert String to base64.
* We can convert pdf to base64.
* We can convert base64 to pdf.
* We can convert base64 to string.
* We can convert plain text to RTF.

Encoding PDF to Base64

If you wants to encode the pdf file to base64 means you can use this function to Encode it.

let encodedPdf = base64.base64Encode('normal.pdf');

Decoding Base64 to PDF

If you wants to decode the base64 string to pdf means you can use this function to Decode it

let decodedBase64 = base64.base64Decode('base64Str', 'PdfFileNameToWrite');

Converting RTF to Plain Text

If you wants to convert the rtf format to plain text means you can use this function as mentioned below.

let plainText = base64.rtfToText('rtfStr');

Converting PlainText to RTF

If you wants to convert the plain text into rtf format means you can use this function.

let rtfText = base64.textToRtf('textStr');

Converting String to Base64

If you wants to convert the String into base64 format means you can use this function.

let base64Str = base64.strToBase64('String');

Converting Base64 to String

If you wants to convert the Base64 format to String means you can use this function.

let str = base64.base64ToStr('base64Str');

Keywords

base64

FAQs

Package last updated on 23 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts