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
Unable to remove the default margin when using Printing.convertHtml(..) function. #135
Comments
Try to reset the margins on the css, like html, body { margin: 0; padding:0} |
This works on android but not in iOS. Updated question at stack overflow We use this, there is a right-margin issue and other left-top-bottom-margin is ok in iOS app.
|
If you want to set the margin regardless, use copyWith(). applyMargin will only increase the margin from what you already have. And you also have to use the provided paper format: await Printing.layoutPdf(onLayout: (PdfPageFormat format) async {
return await Printing.convertHtml(
format: format.copyWith(marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0),
html: '<?xml version="1.0"?><html><body style="margin:0;padding:0" bgcolor="#144434"><h1 style="color:white">Test Layout Margin</h1></body></html>');
}); |
Hello @DavBfr , Please do not close this issue. Thank you so much for the answer. This works on printing case but there is still a problem when we want to save this PDF file and view that created PDF like: (Result shown in the attachment.)
|
@DavBfr I'm waiting for your reply. Is there any ways to resolve this issue? Thank you for your time. |
@DavBfr How can we resolve this margin issue when previewing the PDF?
|
This is fixed in version 2.1.4, don't hesitate to Buy Me A Coffee |
Thank you so much for the answer. I want to help you but our debit card is
not supported Internationally. I am so sorry for that reason.
…On Thu, Sep 12, 2019 at 5:45 PM David PHAM-VAN ***@***.***> wrote:
Closed #135 <#135>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#135?email_source=notifications&email_token=ACWVWC2GVHIBA6WNK33DTSTQJIVPDA5CNFSM4IPO62QKYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOTSY575Q#event-2628902902>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACWVWC34TIJUVIOZMKWOFO3QJIVPDANCNFSM4IPO62QA>
.
|
You can use my bitcoin address: 1QGdK5kuoUBLJDFgtTFCg9WwKDG8Qt4BA2 |
But I do not have any bitcoin. I was applied for Payoneer debit card. As soon as I received the card, I will buy you a coffee via PayPal. Thankyou! |
How to remove the outer margin shown in the android and iOS attachment below?
@dav Is there any solution to this issue. I am waiting for your reply. Thank you for your time. Asked at stack overflow
Android Screenshot
iOS Screenshot
The text was updated successfully, but these errors were encountered: