-
Notifications
You must be signed in to change notification settings - Fork 147
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
Pdf not fit properly in Print preview, make blank space either right and bottom. #208
Comments
Hello @anupsamanta, Could you please provide more information about your printing scenario? Are you printing an HTML image by converting it to a base64 image and then to a PDF? Or are you printing HTML to PDF? It would be helpful to know the specific use case and the steps you are taking. Additionally, have you tried applying styles to the generated HTML or image? Lastly, could you please clarify if this problem is specific to iOS or Android? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@MaruanBO . This is only Android specific issue. Scenario is like that, I am selecting a an image from gallery and saved it locally , then I wants to print it from that filepath.
|
Dear @anupsamanta thank you for your response, As you correctly pointed out, usually the extra white space it has much more to do with the device you use and the printing format. For example some format such as a4 may leave the white space in android and on IOS will work fine. You can use a library to print that allow you to preselect the format to print while launching the printing settings, so the default format is the correct one. To do so, please use the https://docs.expo.dev/versions/latest/sdk/print/ to set the format use https://docs.expo.dev/versions/latest/sdk/print/#types Regards. |
@MaruanBO , Thanks for quick response. As you mentioned to use the library https://docs.expo.dev/versions/latest/sdk/print/ to select print out format and https://docs.expo.dev/versions/latest/sdk/print/#types to set the format, I have checked those, but those are in expo. But I am using react-native-cli. Could you please guide me for react-native-cli. |
Dear @anupsamanta, Those tools are only available on expo, if you are not using it, to keep the KISS principle, is better that you stay with it, in case that is possible migrate to expo (not only to solve this issue since you can solve it without it), is quite easy and it will simplify a lot the whole process of testing the application, deployment and libraries (you will relay in authorized and secure options). Your first option: There is many people with your issue. Your second option: https://docs.expo.dev/bare/using-expo-cli/. Regards. |
Selected an image from device and convert it into a pdf file . After that I used to print that particular pdf file. But pdf is not fit properly in print preview, making blank space in right or bottom.
The text was updated successfully, but these errors were encountered: