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

Import PDFs as an image background #17

Closed
privacymatters1 opened this issue Sep 21, 2022 · 16 comments · Fixed by #322
Closed

Import PDFs as an image background #17

privacymatters1 opened this issue Sep 21, 2022 · 16 comments · Fixed by #322
Labels
enhancement New feature or request

Comments

@privacymatters1
Copy link

privacymatters1 commented Sep 21, 2022

I love this app. In particular the feature of synchronising. Great would be the ability to import PDF files and draw on the PDF. As an example if you get in advance the presentation slides of a lecture in university you could mark important parts and write your own ideas direct on the slides.

Depends on #271

@adil192
Copy link
Member

adil192 commented Sep 21, 2022

I'd like to have this feature too; it'll come not long after I implement customisable backgrounds :)

@adil192 adil192 added the enhancement New feature or request label Sep 21, 2022
@adil192 adil192 changed the title PDF import Import PDFs as an image background Dec 20, 2022
@strk
Copy link
Contributor

strk commented Jan 23, 2023

What's the hard part in this ticket, in relation to #183 (comment) ? Is it not just a matter of converting the PDF to an image ?

@adil192
Copy link
Member

adil192 commented Jan 23, 2023

What's the hard part in this ticket, in relation to #183 (comment) ? Is it not just a matter of converting the PDF to an image ?

There's just more moving parts. Converting the PDF to an image looks fairly simple with pdf_image_renderer. Ideally I'd like to resize each page to match the PDF dimensions which would take some refactoring. Just as a side note, I won't be very active here for a bit since I have exams

@adil192 adil192 mentioned this issue Jan 30, 2023
@strk
Copy link
Contributor

strk commented Feb 3, 2023

I've tried the background image support and indeed it's much different as it ruins my musical staffs (I guess it's due to changing aspect ratio and the image NOT being vectorial as a PDF would be?).

@adil192
Copy link
Member

adil192 commented Feb 3, 2023

I've tried the background image support and indeed it's much different as it ruins my musical staffs (I guess it's due to changing aspect ratio and the image NOT being vectorial as a PDF would be?).

Would increasing the maximum image size in settings help with this? Also if aspect ratio is a problem, you can change the background image fit in the editor menu

@strk
Copy link
Contributor

strk commented Feb 9, 2023 via email

@adil192
Copy link
Member

adil192 commented Feb 9, 2023

I cannot find that setting, where would I find it ?

Near the bottom of settings:
image

@strk
Copy link
Contributor

strk commented Feb 10, 2023

I had version 0.6.0 this not seeing it. After upgrade I see the setting, but my PNG sheet is 8Kb and the max choice for that setting is 2000 (bytes?) so nothing changes.

@adil192
Copy link
Member

adil192 commented Feb 10, 2023

The maximum is 2000x2000 pixels, how big is your png?
Edit: PDFs are capped at 3000x3000px if that helps

@strk
Copy link
Contributor

strk commented Feb 10, 2023 via email

@adil192
Copy link
Member

adil192 commented Feb 10, 2023

Since that's smaller than 2000px, it won't be compressed at all.
Are you by chance talking about the thumbnail on the home screen, since thumbnails are resized to 300px?

@strk
Copy link
Contributor

strk commented Feb 16, 2023 via email

@adil192
Copy link
Member

adil192 commented Feb 16, 2023

Is this what it looks like for you?

@adil192
Copy link
Member

adil192 commented Feb 16, 2023

I'm not sure why that particular image displays incorrectly. It's most likely a Flutter bug.
I've added SVG support in

@strk
Copy link
Contributor

strk commented Feb 16, 2023

Yes, it looks like the screenshot you sent. Will try the SVG path.

@strk
Copy link
Contributor

strk commented Feb 21, 2023

As of version 0.9.3 I'm happy with the PDF background display, thank you !

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

Successfully merging a pull request may close this issue.

3 participants