All Projects → LucasFsc → Html2Pdf

LucasFsc / Html2Pdf

Licence: MIT license
Convert Html to Pdf in Android

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Html2Pdf

marc2bibframe2
Convert MARC records to BIBFRAME2 RDF
Stars: ✭ 72 (+188%)
Mutual labels:  conversion
pesa
A JS money lib whose precision goes up to 11 (and beyond).
Stars: ✭ 38 (+52%)
Mutual labels:  conversion
omnic
Stateless microservice for on-the-fly thumbs and conversions of a wide variety of file types, utilizing conversion graph.
Stars: ✭ 17 (-32%)
Mutual labels:  conversion
qTsConverter
A simple tool to convert qt translation file (ts) to other format (xlsx / csv) and vice versa
Stars: ✭ 26 (+4%)
Mutual labels:  conversion
ledger2beancount
Ledger to Beancount text-based converter
Stars: ✭ 63 (+152%)
Mutual labels:  conversion
ReSampler
High quality command-line audio sample rate converter
Stars: ✭ 120 (+380%)
Mutual labels:  conversion
dom-to-image-more
Generates an image from a DOM node using HTML5 canvas
Stars: ✭ 231 (+824%)
Mutual labels:  conversion
pngquant
A Python Wrapper of Pngquant
Stars: ✭ 27 (+8%)
Mutual labels:  conversion
RouteConverter
The popular GPS conversion and editing tool
Stars: ✭ 123 (+392%)
Mutual labels:  conversion
bidskit
Utility functions for working with DICOM and BIDS neuroimaging data
Stars: ✭ 52 (+108%)
Mutual labels:  conversion
geofiddle
Geometric conversions between different formats and projections
Stars: ✭ 15 (-40%)
Mutual labels:  conversion
xmind2testlink
Convert xmind to test link xml files, support xmind pro and xmind zen.
Stars: ✭ 99 (+296%)
Mutual labels:  conversion
cryptoformat
Javascript library to format and display cryptocurrency and money
Stars: ✭ 40 (+60%)
Mutual labels:  conversion
DIVA Tools
A global host of tools used to mod/parse Project DIVA games.
Stars: ✭ 24 (-4%)
Mutual labels:  conversion
CryptionTool
一个CTF+渗透测试工具框架,集成常见加解密,密码、编码转换,端口扫描,字符处理等功能
Stars: ✭ 62 (+148%)
Mutual labels:  conversion
xiny
Simple command line tool for unit conversions
Stars: ✭ 40 (+60%)
Mutual labels:  conversion
aspose-words-cloud-node
Node.Js library for communicating with the Aspose.Words Cloud API
Stars: ✭ 20 (-20%)
Mutual labels:  conversion
tensorflow-tensorrt
Tensorflow to TensorRT Model Converter
Stars: ✭ 30 (+20%)
Mutual labels:  conversion
G711
PCM to G711 Fast Conversions
Stars: ✭ 39 (+56%)
Mutual labels:  conversion
xsampa
X-SAMPA to IPA converter
Stars: ✭ 20 (-20%)
Mutual labels:  conversion

Html2Pdf

Android library to convert Html from strings into Pdf files.

This library is not mainteined anymore

Feel free to fork and use it.

Download

allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
    }
}

implementation 'com.github.LucasFsc:Html2Pdf:0.2-beta'

How do I use it?

In your MainActivity instantiate the converter class and pass the parameters:

class MainActivity : AppCompatActivity(), Html2Pdf.OnCompleteConversion /* Callback */ {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        //Impl example
        val converter = Html2Pdf.Companion.Builder()
            .context(this)
            .html("<p> Your awesome HTML string here! </p>")
            .file(File(URI("Your Pdf file URI")))
            .build()

        //can be called with a callback to warn the user, share file...
        converter.convertToPdf(this)

        //or without a callback
        converter.convertToPdf()
        
    }

    override fun onSuccess() {
        //do your thing
    }

    override fun onFailed() {
        //do your thing
    }
    
}

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].