Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
PDF is a fixed page format that is very popular among users and is widely supported by various applications, as a PDF document looks the same on any device. For this reason, converting to PDF is an important feature of Aspose.Words.
PDF is a complex format by itself, as it has a specific file structure, graphical model, font embedding, and some complex output functionality such as document structure tags, encryption, digital signatures, and editable forms. In addition, converting a document to PDF requires several calculation stages, which are complex and time‑consuming.
In this section, we will consider the main problems that may arise when working with documents in various PDF standards and describe options for solving them.
Aspose.Words now allows users to work with PDF/A-1, PDF/A-2 and PDF/A-4 formats, as well as PDF/UA-1:
PDF/A is an ISO‑standardized version of PDF intended for use in archiving and long‑term storage of electronic documents. At the same time, PDF/UA is another ISO standardized version of PDF designed to ensure accessibility for people with disabilities who use assistive technology. To specify the level of compliance with PDF standards, use the PdfSaveOptions.compliance property. Due to storage conditions, PDF/A document must embed all fonts and disable encryption, while PDF/UA must only embed all fonts.
In this section, we will take a closer look at working with PDF/A or PDF/UA-1 documents.
To learn more about the different PDF standards, check the following ISOs:
Problem: Conversion to PDF/A fails with an error about missing fonts.
Solution: Ensure the required fonts are installed on the machine running the conversion, or provide a custom font source by setting options.custom_font_sources. Also verify that options.embed_full_fonts is set to True so Aspose.Words embeds the fonts automatically.
Problem: The generated PDF/A file is rejected because it is encrypted.
Solution: Remove any encryption settings before saving. When using PDF/A compliance, do not set options.encrypt or any PdfEncryptionOptions. If encryption is required for a non‑PDF/A PDF, use a different compliance level.
Problem: Transparency in images causes the PDF/A‑1 conversion to produce a blank page.
Solution: Either change the compliance to PDF/A‑2 (PdfCompliance.PdfA2b) which permits transparency, or rasterize/flatten the transparent objects in the source document (e.g., convert them to PNG without alpha channel).
Problem: PDF/UA output is missing document structure tags, resulting in accessibility warnings.
Solution: Verify that the source Word document uses proper heading styles, alt text, and language attributes. Aspose.Words copies these tags only when they exist. If necessary, add them programmatically using DocumentBuilder before saving.
Problem: The conversion process is extremely slow for large documents.
Solution: Reduce the workload by disabling unnecessary features such as digital signatures (options.digital_signature = None) and by using options.optimize_output = True. Also ensure the machine has sufficient memory and that font caching is enabled.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.