Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Thu Feb 22, 2024 9:30 am

Dear collagues,

I thinking to purchase the Spire.doc python library, but I do not found the possibility to render a single paragraph or a run to an image. I saw the possibility to render a complete page, but I need to render a part into a image.

The use case is that I need to convert content like WordMath formulas, OLE objects or some WMF files into an image, for conversion in another format. Also Word drawings needs to be converted to "screenshots". I do not found a possibility to do this with the library?

In this context can you confirm that I can extract from documents:
- the list item labels
- formating meta information
- footnotes
- bookmarks
- custom fields
- header and footer
- document meta information
- TOC
- location on which page and where on the page of a text box

I saw the possibility for this in the documentation, but just to be sure ;-). Thank you very much for your response.

Cheers Tiberius

tibopitz
 
Posts: 2
Joined: Thu Feb 22, 2024 9:18 am

Fri Feb 23, 2024 6:45 am

Hello,

Thank you for your inquiry.
Regarding the functionalities you mentioned, "Word drawings needs to be converted to 'screenshots'" is currently not supported by our system. Could you please provide more details about the requirement for "formatting meta information"?
Furthermore, concerning text boxes, at the moment, we can only retrieve the position of the text boxes but cannot determine on which page of the Word document the text box is located.
I have attached sample code related to the functionalities you mentioned for your reference. Please review the code and let us know if you have any further questions or need additional assistance.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1651
Joined: Wed Apr 07, 2021 2:50 am

Thu Mar 07, 2024 11:07 am

Dear Annika,

Thank you very much for the answer. Sorry I not clear enough. I meant with the "formatting meta information" that you have the possiblity to format a paragraph as (predefined) Standrad, Heading1, Heading2, List element or (user defined) MyCustomFormatingLabel. Is possible to extrac this label information from a paragraph, and maybe the information on which predefined format this current one is based on (in the most cases is 'Standard').

I wanted to ask if you have a function like MathToImage() for a complete Paragraph e.g ParagprahToImage()? I know to do it for a complete page is possible.

I wanted to know, do have you Spire.PDF library the same functionality as the Spire.Word has for parsing documents, with the specified functionalities, beside parsing paragraph by paragraph along the document structure.

Thank you very much
Cheers Tiberius

tibopitz
 
Posts: 2
Joined: Thu Feb 22, 2024 9:18 am

Fri Mar 08, 2024 6:32 am

Hello,

Thank you for reaching out with your questions.
Here are my responses to each of your queries:
Regarding the "formatting meta information" inquiry, if you are looking to retrieve paragraph styles, please refer to the code snippet provided in the attachment for guidance on how to obtain paragraph styles.
In response to your second question, currently, our Spire.Doc does not directly support the conversion of paragraphs into images. However, you can achieve this by cloning the paragraph into a new blank document and then converting it into an image. For detailed code instructions, please refer to the "ParagraphToImage.py" file attached.
For your third question, our Spire.PDF parses PDF documents by sequentially analyzing the document structure, and there are no alternative methods available at present.
If you require further clarification or assistance on these matters, please feel free to let us know.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1651
Joined: Wed Apr 07, 2021 2:50 am

Return to Spire.Doc