Rob
02/27/2025, 1:25 PMCeligo AI
02/27/2025, 1:25 PMAI generated answer (using internal Slack threads):Based on the conversations, there are a few ways to check if a file will exceed 10MB when rendering XML to PDF: 1. Check the file size before saving: You can log the file size just before you save it. This can be done by using the
File.size
property in SuiteScript. If the file size exceeds 10MB, you can take necessary actions to reduce it.
2. Use File.appendLine
: If you're creating a file via SuiteScript, you can create an empty file and then use File.appendLine
. The limit is 10MB per line, so this method can help you avoid exceeding the total file size limit.
3. Reduce image sizes: If your XML file contains images, they could be the reason for the large file size. You can use image conversion apps or websites like kraken.io or squoosh.app to reduce the size of the images without affecting their quality. You can also try different image formats, as some images compress better with different algorithms.
Remember, these methods are not foolproof and the actual file size after rendering XML to PDF might still exceed 10MB due to various factors. It's always a good idea to keep the content as optimized as possible to avoid hitting the limit.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
02/27/2025, 1:25 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.799416244
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.790803134
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.789901555
Celigo AI
02/27/2025, 1:25 PM