Handle page breaks and paragraph spacing

Peace and Good Day Andrey,

Thankyou for contacting and asking.

Actually we are using the JAVA version of group docs APIs. I tried to explore the .Net version to see if it has better support for Editor UI.

Our current challenge is to handle page breaks and paragraph spacing. Is there any good resources or technical assistance you can refer to in this regard.

Thankyou


This Topic is created by alexey.noskov using Email to Topic tool.

@alexey.noskov

To handle page breaks and paragraph spacing in the Java version of GroupDocs APIs, it’s important to note that the public API does not currently allow for direct modifications of page margins, page size, or line spacing during editing. However, you can work around this limitation by following these steps:

  1. Convert the Document to HTML: Open your document and convert it to HTML format. This allows you to manipulate the content more freely.

  2. Make Necessary Changes: Once in HTML format, you can adjust the page margins, page size, and line spacing as needed. This might involve editing the CSS styles associated with the document.

  3. Save the Document: After making the desired changes, save the document back to its original format. This will reflect the adjustments you made regarding page breaks and paragraph spacing.

This approach provides a way to achieve the desired formatting even though direct support for these features is limited in the API. If you need further assistance or specific examples, please let me know!

Sources:
[1]: Supported Formatting for Editor

1 Like

Hi @Shakeel_Ahmed

Please clarify which exact problem you try to solve with GroupDocs.Editor or GroupDocs.Editor.UI? You`re mentioning the handling of page breaks and paragraph spacing - does this have relation to some specific document?

In general, if we’re talking about the GroupDocs.Editor (no matter, .NET or Java version), it converts the document of supported format to the editable HTML-markup. Then this HTML-markup should be transfer to the 3rd-party HTML WYSIWYG-editor, edited in the browser, send back to server, and then the GroupDocs.Editor can create a new document from this edited markup. In this scenario the 3rd party HTML WYSIWYG-editor, provided and hosted by the user, is responsible for handling page breaks and paragraph spacing.

If we’re talking about GroupDocs.Editor.UI, it internally contains a GroupDocs.Editor but also contains a ready-to-use own HTML WYSIWYG-editor, which works in the client browser and is written on Angular. This Angular-based HTML editor is capable to work with page breaks and paragraph spacing in general, but, of course, it has no such wide possibilities as you can find in MS Word, for example.

That’s why in order to give you the most relevant and accurate answer, please describe your question or issue in details, please.

With best regards,
Denis Gvardionov