-
Notifications
You must be signed in to change notification settings - Fork 10k
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
[Editor] Support svg images in the stamp annotation #16650
Conversation
eaf9ea2
to
91e17c9
Compare
Can you please add reference tests for this, e.g. copying these existing ones and using |
The problem is that we always pass a bitmap to the worker and these tests only test saving/printing. |
Something else we could try is to make an integration test and at some save the pdf but in using directly the api to get the saved stream, then parse the result and finally check that everything is ok: it'd be a mix of integration test and unit test. Wdyt ? |
If that works without too much trouble, then it sounds like a good idea! |
91e17c9
to
681f20e
Compare
It's easy to get the bytes buffer from a saved pdf but it's more complex to parse it. |
681f20e
to
be49090
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me, with the comment addressed; thank you!
createImageBitmap doesn't work with svg files (see bug 1841972), so we need to workaround this in using an Image. When printing/saving we must rasterize the image, hence we get the biggest bitmap as image reference to avoid duplications or poor quality on rendering.
be49090
to
4fcc2ef
Compare
/botio integrationtest |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @calixteman received. Current queue size: 0 Live output at: http://54.193.163.58:8877/28257170328eab0/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @calixteman received. Current queue size: 0 Live output at: http://54.241.84.105:8877/c931795028f38e4/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/c931795028f38e4/output.txt Total script time: 3.96 mins
|
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/28257170328eab0/output.txt Total script time: 26.42 mins
|
createImageBitmap doesn't work with svg files (see bug 1841972), so we need to workaround this in using an Image.
When printing/saving we must rasterize the image, hence we get the biggest bitmap as image reference to avoid duplications or poor quality on rendering.