Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add feature #6

Open
PRQAE opened this issue Jul 23, 2023 · 2 comments
Open

add feature #6

PRQAE opened this issue Jul 23, 2023 · 2 comments
Labels
feature request New feature or request

Comments

@PRQAE
Copy link

PRQAE commented Jul 23, 2023

hi, thank you for the plugin.

can you add classes, like to use conditions for the classes, ex:

import 'dart:io';
import 'package:htmltopdfwidgets/htmltopdfwidgets.dart';

void main() {
createDocument();
}

boolean signedin = true;
const htmlText = '''<p style=" signedin == true "green;" ? "red;" "> status

"''';

createDocument() async {
var filePath = 'example.pdf';
var file = File(filePath);
final newpdf = Document();
List widgets = await HTMLToPdf().convert(htmlText);
newpdf.addPage(MultiPage(
maxPages: 200,
build: (context) {
return widgets;
}));
await file.writeAsBytes(await newpdf.save());
}

@alihassan143
Copy link
Owner

@PRQAE sure i will work on that and will implement that feature
if you have time and you can implement that feature and submit a pr

@alihassan143 alihassan143 added the feature request New feature or request label Jul 23, 2023
@vasanthmn1
Copy link

@alihassan143 You implement CSS class in this plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants