Merge pull request #19779 from danielpetri1/PR-19707
fix(bbb-export-annotations): Flag to force CairoSVG to embed images
This commit is contained in:
commit
8502b50d1b
@ -20,7 +20,8 @@
|
|||||||
"maxImageHeight": 1080,
|
"maxImageHeight": 1080,
|
||||||
"textScaleFactor": 2,
|
"textScaleFactor": 2,
|
||||||
"pointsPerInch": 72,
|
"pointsPerInch": 72,
|
||||||
"pixelsPerInch": 96
|
"pixelsPerInch": 96,
|
||||||
|
"cairoSVGUnsafeFlag": false
|
||||||
},
|
},
|
||||||
"notifier": {
|
"notifier": {
|
||||||
"pod_id": "DEFAULT_PRESENTATION_POD",
|
"pod_id": "DEFAULT_PRESENTATION_POD",
|
||||||
|
@ -11,9 +11,11 @@ logger.info('Running bbb-export-annotations');
|
|||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
const client = redis.createClient({
|
const client = redis.createClient({
|
||||||
host: config.redis.host,
|
|
||||||
port: config.redis.port,
|
|
||||||
password: config.redis.password,
|
password: config.redis.password,
|
||||||
|
socket: {
|
||||||
|
host: config.redis.host,
|
||||||
|
port: config.redis.port
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
await client.connect();
|
await client.connect();
|
||||||
|
@ -25,9 +25,11 @@ const jobType = exportJob.jobType;
|
|||||||
|
|
||||||
async function collectAnnotationsFromRedis() {
|
async function collectAnnotationsFromRedis() {
|
||||||
const client = redis.createClient({
|
const client = redis.createClient({
|
||||||
host: config.redis.host,
|
|
||||||
port: config.redis.port,
|
|
||||||
password: config.redis.password,
|
password: config.redis.password,
|
||||||
|
socket: {
|
||||||
|
host: config.redis.host,
|
||||||
|
port: config.redis.port
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
client.on('error', (err) => logger.info('Redis Client Error', err));
|
client.on('error', (err) => logger.info('Redis Client Error', err));
|
||||||
|
@ -20,9 +20,11 @@ const exportJob = JSON.parse(job);
|
|||||||
* sending a message through Redis PubSub */
|
* sending a message through Redis PubSub */
|
||||||
async function notifyMeetingActor() {
|
async function notifyMeetingActor() {
|
||||||
const client = redis.createClient({
|
const client = redis.createClient({
|
||||||
host: config.redis.host,
|
|
||||||
port: config.redis.port,
|
|
||||||
password: config.redis.password,
|
password: config.redis.password,
|
||||||
|
socket: {
|
||||||
|
host: config.redis.host,
|
||||||
|
port: config.redis.port
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
await client.connect();
|
await client.connect();
|
||||||
|
@ -794,9 +794,11 @@ function overlay_annotations(svg, currentSlideAnnotations) {
|
|||||||
// Process the presentation pages and annotations into a PDF file
|
// Process the presentation pages and annotations into a PDF file
|
||||||
async function process_presentation_annotations() {
|
async function process_presentation_annotations() {
|
||||||
const client = redis.createClient({
|
const client = redis.createClient({
|
||||||
host: config.redis.host,
|
|
||||||
port: config.redis.port,
|
|
||||||
password: config.redis.password,
|
password: config.redis.password,
|
||||||
|
socket: {
|
||||||
|
host: config.redis.host,
|
||||||
|
port: config.redis.port
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
await client.connect();
|
await client.connect();
|
||||||
@ -868,11 +870,18 @@ async function process_presentation_annotations() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Scale slide back to its original size
|
/**
|
||||||
|
* Constructs the command arguments for converting an annotated slide from SVG to PDF format.
|
||||||
|
* `cairoSVGUnsafeFlag` should be enabled (true) for CairoSVG versions >= 2.7.0
|
||||||
|
* to allow external resources, such as presentation slides, to be loaded.
|
||||||
|
*
|
||||||
|
* @const {string[]} convertAnnotatedSlide - The command arguments for the conversion process.
|
||||||
|
*/
|
||||||
const convertAnnotatedSlide = [
|
const convertAnnotatedSlide = [
|
||||||
SVGfile,
|
SVGfile,
|
||||||
'--output-width', to_px(slideWidth),
|
'--output-width', to_px(slideWidth),
|
||||||
'--output-height', to_px(slideHeight),
|
'--output-height', to_px(slideHeight),
|
||||||
|
...(config.process.cairoSVGUnsafeFlag ? ['-u'] : []),
|
||||||
'-o', PDFfile,
|
'-o', PDFfile,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user