-
Notifications
You must be signed in to change notification settings - Fork 73
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
Fix image size in PDF #226
Comments
Hi @SankethBK , I noticed that this issue is unassigned, and I'd love to work on it! I'm familiar with the technology used in this project and I believe I can help resolve it. Could you please assign this issue to me? Thank you! |
Hi @xkaper001 , please go ahead |
Hey @SankethBK, I took a look at the issue, and I believe I resolved it, kindly take a look at the pr. #234, and let me know if it needs to be modified. |
@vaishnavi-2301 Don't you know you have to first get an issue assigned Then start working on it. |
Hey @xkaper001, I understand your concern, but this is an open-source project, which means anyone can contribute. I had already looked into this issue, worked on a solution, and submitted a PR before realizing it was assigned to you. You're welcome to take a look at my PR, and we can collaborate or build on it from there. Open-source contributions are meant to be collaborative, so I'm happy to discuss any changes or improvements! |
Yeah exactly an open source project means anyone can contribute. but think logically what exactly is the point of multiple people working on the same issue independently when only one's PR will get merged. That's not how open source works. Again I am not saying your PR is wrong. but the approach is. Next time keep in mind to ask the maintainers to get the issue assigned to yourself or ask to collaborate on the issue if someone's already working on it. That's how open source works. |
Hey @xkaper001 and @vaishnavi-2301 , I truly appreciate the time and effort each of you has put into working on this issue. @vaishnavi-2301 Thank you for working on this issue. I understand that since this is a small issue, you were probably experimenting with a POC and arrived at a solution. Having issues assigned before starting work is helpful to avoid overlap and ensure we use everyone's time effectively. @xkaper001 If you haven't started working on this, you can review @vaishnavi-2301 's PR and collaborate to add any improvements if necessary. If you already have a working fix, feel free to submit your own PR. I'll review both. I'll also be adding more issues today, so there will be plenty of opportunities for everyone to contribute. |
Thanks @SankethBK, tho I had started working on this. one I'll prefer working on newer issues since this was already fixed. |
Currently when a note containing image is exported into PDF, the image dimensions are retained from uploaded image and it fills up 2-3 pages in PDF.
For example this is the note
Pdf will be something like this
PDF is generated from
exportNotesToPDF
function which eventually callspreprocessDeltaForPDFExport
function inlib/features/notes/data/repositories/export_notes_repository.dart
. This function first converts delta format to HTML and then to PDF. We can access each delta element and its attributes inside this function. We need to edit theimg
tags generated in HTML to and add suitableheight
,width
attributes so that the image doesn't span over multiple pages in PDF.Relevant widgets
The text was updated successfully, but these errors were encountered: