Answers to frequently asked questions about document processing in Intelligent Media Management (IMM).
Document conversion
What formats are supported by document conversion?
-
The following table describes the supported input formats.
File type
Format
Text files
DOC, DOT, WPS, WPT, DOCX, DOTX, DOCM, and DOTM
Presentation files
PPTX, PPT, POT, POTX, PPS, PPSX, DPS, DPT, PPTM, POTM, and PPSM
Spreadsheet files
XLS, XLT, ET, ETT, XLSX, XLTX, CSV, XLSB, XLSM, and XLTM
Other files
PDF, LRC, C, CPP, H, ASM, S, JAVA, ASP, BAT, BAS, PRG, CMD, RTF, TXT, LOG, and XML
-
The following table describes the supported output formats.
Format
Description
JPEG
One JPEG image is generated per page based on the file layout.
PNG
One PNG image is generated per page based on the file layout.
PDF
One PDF file is generated per source file.
TXT
One TXT file is generated per source file.
Does IMM provide a synchronous API operation for document conversion?
No. IMM does not provide a synchronous API operation for document conversion. To convert a document, call the asynchronous operation CreateOfficeConversionTask to create an asynchronous conversion task. You can configure Simple Message Queue (SMQ) to receive notifications about conversion results.
What are the limits on the file size and page count for document conversion?
-
File size
The maximum file size is 200 MB. This limit cannot be adjusted.
-
Page count
There is no limit on the number of pages that can be converted. By default, all pages in a document are converted. You can use the
EndPageparameter to limit the number of pages to convert.
How do I convert a worksheet in an Excel file to a single image?
Document-to-image conversion works similarly to document printing. Each image corresponds to a printed page and has a size limit. If you convert a large worksheet to an image format, the worksheet is split into multiple images.
You can set the FitToWidth and FitToHeight parameters to true to fit all rows and columns of a worksheet into one image. If the worksheet content exceeds an A4 page at the default page size, it is divided into multiple images. In this case, you can use the PaperSize parameter to customize the page size.
How do I convert a document to a PDF file that contains only images?
First, convert the document to images as described in Document conversion. Then, call the CreateImageToPDFTask operation to merge the images into a PDF file.
How do I control whether to paginate when I convert a spreadsheet to PDF or an image format?
When you call the CreateOfficeConversionTask operation, you can use the FitToWidth and FitToHeight parameters to control whether to paginate.
When I include variables in the value of the TargetURI parameter in the CreateOfficeConversionTask request, can I obtain the actual URIs?
No, you cannot obtain the actual URIs.
Does WebOffice support conversion from PowerPoint to HTML?
No, WebOffice does not support conversion from PowerPoint to HTML.
Can I convert a multipage document to a single image?
Yes, you can convert a multipage document to a single image by setting the LongPicture parameter to true in the CreateOfficeConversionTask operation.
Can I display comments in the resulting images in a document-to-image conversion task?
You can display comments in the resulting images only if you convert a Word document to images.
Can I convert multiple pages of a PDF to a specific number of images?
No, you cannot convert multiple pages of a PDF file to a specific number of images.
Can I use the document conversion feature of IMM V1.0 to convert a document in an IMM V2.0 project?
No, you cannot use the document conversion feature of IMM V1.0 to convert a document in an IMM V2.0 project.
How can I obtain the number of pages after I convert a document to images?
You can call the ListObjects operation of Object Storage Service (OSS) to obtain the page count after converting a document to images. Note the pagination mechanism of the operation. By default, each call to the ListObjectsV2 operation returns up to 100 objects. The NextContinuationToken value returned by a call is used as the continuation-token input parameter of the next call for pagination.
Can document conversion be used across regions?
No. Document conversion cannot be used across regions. Make sure that the OSS bucket and the IMM instance are in the same region.
What do I do if line breakers occur to normally displayed texts after I convert a PowerPoint file to a PDF file?
Unsupported fonts are automatically replaced with similar supported fonts, which may cause layout or style changes. For information about supported fonts, see Document font limits.
What do I do if the number of pages increases after I convert a Word file to a PDF file?
Unsupported fonts are automatically replaced with similar supported fonts, which may cause layout or style changes, resulting in a different page count. For information about supported fonts, see Document font limits.
Online document collaboration
What document formats are supported by online document collaboration?
The following table lists the formats supported by online document collaboration.
|
Document type |
Format |
|
Text document files |
DOC, DOT, WPS, WPT, DOCX, DOTX, DOCM, DOTM, and TXT |
|
Spreadsheet files |
XLS, XLT, ET, XLSX, XLTX, XLSM, and XLTM |
|
Presentation files |
PPTX, PPT, POTX, PPS, PPSX, DPS, DPT, PPTM, POTM, and PPSM |
|
PDF (only preview supported) |
|
Is there a file size limit for online document collaboration?
Yes. The maximum file size is 200 MB. This limit cannot be adjusted.
How can I preview a document online?
When you call the GenerateWebofficeToken operation, set the Readonly field of the Permission parameter to true to enable preview-only mode and disable editing.
To hide the document editing button, set the Hidecmb parameter to true.
How do I get the total number of pages in a PDF document that is being previewed or edited by using WebOffice?
You can use the ActivePDF.PagesCount property to get the total number of pages of the PDF document.
How am I billed for online document collaboration?
You are billed for online document collaboration based on the number of times documents are opened. Preview incurs preview charges, and editing incurs editing charges. For more information, see Document processing.
Can I preview a document stored in Object Storage Service (OSS) that does not include an extension in its name?
Yes. You can preview such a document by specifying the Filename parameter.
If you specify the Filename parameter, the document format is determined by the extension in the Filename value. If you do not specify the Filename parameter, the format is determined by the extension in the OSS object name.
Can I preview a document stored in an OSS bucket for which hotlink protection is configured?
Yes. However, make sure that you set the Referer parameter to one of the allowed domain names in the hotlink protection configuration.
How many users can collaborate on a document online at the same time?
-
Up to 50 users can edit a document online at the same time.
-
Theoretically, an unlimited number of users can preview a document online at the same time.
What is the validity period of an access token for online document collaboration, and can I customize this duration?
The validity period of an access token for online document collaboration is 30 minutes. You cannot customize the duration. If an access token expires, call the RefreshWebofficeToken operation to refresh it.
Can I use a refresh token in multiple calls to the RefreshWebofficeToken operation?
No, you cannot use a refresh token in multiple calls to the RefreshWebofficeToken operation. A refresh token can be used only once.
How can I protect a document from being edited while it is being previewed?
To protect a document from being edited, you can use the ActiveDocument.Protect method to protect the document. The protection on the document can be removed only when you provide the correct password in a call to the ActiveDocument.Unprotect method.
Why did I receive a notification that my editing permission has been canceled when I preview or edit a document online?
You received this notification because the access token you used is being used by another user. An access token can be used by only one user at a time. If multiple users want to preview or edit a document simultaneously, each user must call the GenerateWebofficeToken operation to obtain a separate access token.
Can I limit online editing of a document to only one user?
No, you cannot limit online editing of a document to only one user.
Can document preview be accelerated by using Alibaba Cloud CDN?
No, document preview cannot be accelerated by using Alibaba Cloud CDN.
Am I charged for exporting a document in online document collaboration?
No, you are not charged for exporting a document in online document collaboration. For more information, see Billable items.
Can I print a document when I access it from a mobile device?
No, you cannot print a document when you access it from a mobile device.
Can I export a specific range of document pages by specifying the starting and ending page numbers?
No, you cannot export a specific range of document pages by specifying the starting and ending page numbers.
When I edit a document online by using WebOffice, how can I determine whether the data source referenced by this document from another document has changed?
WebOffice does not provide a method for you to determine whether a change occurs to the data source in cross-referencing.
Can I apply automatic changes to the color or background color of modified text in online document editing?
No, you cannot apply automatic changes to the text color or background color of modified text in online document editing.
How do I disable the View Source Image control for a PDF preview?
To disable the View Source Image control, you can configure the isInSafeMode parameter described in Configurations for PDF documents and implement custom frontend development based on the obtained access token.
Can I open a hyperlink to an object stored in OSS while previewing the document that contains the hyperlink by using WebOffice?
No, you cannot open a hyperlink to an object stored in OSS when you use WebOffice to preview the document that contains the hyperlink.
Am I charged an outbound traffic fee for reading data from OSS when I preview a document?
No, you are not charged an outbound traffic fee for reading data from OSS during a document preview.
How does WebOffice enforce the limit that an access token can be simultaneously used only by one user?
WebOffice enforces this limit by monitoring the number of active connections made with the access token. Each token allows only one simultaneous connection.
How much content can be copied during an online document preview?
In a cross-application copy and paste operation, you can copy up to 37,000 characters for text documents or up to 10,000 cells within an Excel file on a frontend client. This limit prevents browsers from crashing. If you exceed the limit, trailing content is ignored and not pasted.
Why is the toolbar still visible on the preview page after I set the Hidec parameter to true in a call to the GenerateWebofficeToken operation for a document preview?
One possible reason is that the SDK for Java converts the special character '&' in the returned WebOffice URL to '&', which invalidates the Hidec parameter at the end of the URL. To resolve this issue, either replace '&' with '&' in the frontend code or disable the escaping of '&' in the backend code.
Can I monitor the preview progress when I preview a document by using WebOffice?
No. WebOffice uses lazy loading for documents. You cannot obtain full document information until the end of the document is reached.
Can multiple users that simultaneously work on a document with WebOffice see changes made by each other?
If multiple users simultaneously edit a document with WebOffice, they can see each other's changes in real time. Online document collaboration supports real-time synchronization, so every user sees document changes as they happen. This helps prevent unexpected deletions and content loss. Historical versions are saved automatically, allowing users to restore documents to specific versions. The highlight feature helps users identify changes made by different users.
How can I implement a normal playback of a PowerPoint file for document preview instead of a full-screen display?
You can use the app.ActivePresentation.SlideShowSettings.Run(true) method to play a PPT file in the browser in normal mode instead of displaying it in full-screen mode.
async function example() {
await instance.ready();
const app = instance.Application;
// Play the PowerPoint file in normal mode in the browser.
await app.ActivePresentation.SlideShowSettings.Run(true);
}
Can I view additions, deletions, and modifications made to a document with IMM WebOffice?
Yes, you can view additions, deletions, and modifications by clicking the menu icon in the upper-left corner and viewing the collaboration records.
Can a front-end page detect whether changes have been made to a document opened in IMM WebOffice for online editing?
Yes, the SDK for JavaScript can be used to listen for document save events. For more information, see fileStatus.
If a Word page exceeds the page boundary, can I convert it into a single PDF page instead of multiple ones?
No, you cannot convert a page of a Word document to a single page if it exceeds the page boundary. However, you can convert multiple Word pages into a single image by setting the LongPicture parameter to true.
Does WebOffice document preview support collection and analysis of user behavior data?
No. WebOffice document preview does not support collection and analysis of user behavior data.
If a message indicating a load failure is displayed after no operation is performed for a specific period of time when I use WebOffice to preview a document, will a WebSocket connection still be established? If no, how long will the disconnection last?
An access token expires in 30 minutes while a refresh token expires in one day. After a token expires, a WebSocket connection is still maintained. You can monitor the WebSocket status using the webSocketStatus event. For more information, see Event handling.
Can I enable acceleration if it is slow to convert a document to a PDF file?
Document conversion speed is affected by document type, document size, and service workload. IMM does not guarantee the timeliness of asynchronous operations. You can configure SMQ messages to receive task notifications.
What do I do if the preview content is not refreshed after a file opened using the x-oss-process=doc/preview method is updated?
This happens because the server has not closed the file. The system reads data from OSS only after the server closes the file. To resolve this issue, close all preview pages of the file and wait approximately 5 minutes before previewing the updated file.
How do I obtain the number of previews on a file?
You can obtain the number of previews on a file using CloudMonitor or the IMM console.
How do I add a hyperlink to an image inserted into a PowerPoint file using a JavaScript SDK when I use WebOffice to edit the file?
You cannot add a hyperlink to an image inserted into a PowerPoint file using a JavaScript SDK.
How do I perform page switching on a PowerPoint file in a computer using a mobile phone when I use WebOffice to present the file?
For information about how to resolve the issue, see Present content in meetings.
Can I add controls between two original controls of WebOffice?
No. You can add only custom secondary controls in WebOffice. For further instructions, see Add custom elements.
Is the WebOffice URL returned for online editing and online preview of a document in OSS the same?
Yes. The WebOffice URL is the same if you generate two tokens used for online editing and online preview respectively by calling the GenerateWebofficeToken operation. For more information, see GenerateWebofficeToken.
Can I disable the auto save feature when editing a document using WebOffice?
No, you cannot disable the auto save feature when editing a document using WebOffice.
Can I specify a parameter to display different logon users when multiple users edit a document in OSS?
If you edit documents using the x-oss-process method of OSS, you cannot specify a parameter to display different logon users. If you edit documents by calling the corresponding operation of WebOffice, you can specify the User parameter to display different logon users. For more information, see GenerateWebofficeToken.
Can I use code to create a document in WebOffice?
No, you cannot use code to create a document in WebOffice. You can store a template document in OSS, call the CopyObject operation to copy a new document, and then edit the document in WebOffice to create a document.
How can I update cache preview in WebOffice?
WebOffice does not support cache update.
Can I add a new button after I hide the bottom toolbar when previewing a PDF file using WebOffice on a mobile device?
No.
Am I billed multiple times if I refresh the browser after a signed URL is generated using the x-oss-process=doc/preview setting?
Yes. Every time a generated signed URL is opened, the GenerateWebofficeToken operation is called. You are charged fees for the operation.
If the "Editing permissions are revoked" error appears when I open a token for document preview in WebOffice on multiple clients, can an SDK listen to it?
No, SDKs cannot listen to the "Editing permissions are revoked" error.
Can I specify a custom value for the URL returned by an operation of WebOffice?
No. You cannot specify a custom value for the URL returned by an operation of WebOffice.
Can I set the autoplay feature for videos when previewing a PowerPoint document using WebOffice?
No. WebOffice does not support the autoplay feature for videos in PowerPoint documents.
Can I configure a custom Opening icon displayed during the preview loading of PowerPoint documents in WebOffice?
No. WebOffice does not support custom Opening icons during preview loading of PowerPoint documents.
Fonts
Why is the output font different from the original font in a document processing operation? Can I customize the output font for a document processing operation?
The output font differs from the original because the original font is unsupported and is automatically replaced with a similar font. You cannot customize the output font. For more information about supported fonts, see Document font limits.