Skip to content

Revamp docs#352

Merged
epanholz merged 8 commits intomainfrom
revamp-docs
Mar 5, 2026
Merged

Revamp docs#352
epanholz merged 8 commits intomainfrom
revamp-docs

Conversation

@rijulshrestha
Copy link
Contributor

Updated 'Library mode' and 'Resource preloading' docs.

@rijulshrestha rijulshrestha self-assigned this Feb 16, 2026
@rijulshrestha rijulshrestha added the documentation Improvements or additions to documentation label Feb 16, 2026
@rijulshrestha
Copy link
Contributor Author

For the 'Resource preloading' doc. I've reworded a large chunk of content to make the flow better and to have different sections.

As for the 'Library mode' doc, I've added subsection and a few more lines of content to make the flow better.

@rijulshrestha rijulshrestha marked this pull request as ready for review February 16, 2026 17:28
Copy link
Member

@epanholz epanholz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also review if the example of the standard Java library works well, same for the itext example. I remember vaguely that one of the examples needed some adjustments but I am unsure.

@rijulshrestha
Copy link
Contributor Author

rijulshrestha commented Feb 17, 2026

Please also review if the example of the standard Java library works well, same for the itext example. I remember vaguely that one of the examples needed some adjustments but I am unsure.

I’ve double-checked both examples, and they work as expected. However, since we currently only provide the JavaScript snippets, I think including a minimal HTML wrapper for each example would make it easier for readers to follow along. Especially for the iText example.

@GabrielaReyna
Copy link
Contributor

Hey Rijul, let me know over DM when you want me to review and merge this PR

@epanholz
Copy link
Member

Hey @GabrielaReyna, I still needed to review some things and will also merge the PR once done. I did not get notification for the re-review that's why it's open for a few days now, by bad.

@epanholz
Copy link
Member

Please also review if the example of the standard Java library works well, same for the itext example. I remember vaguely that one of the examples needed some adjustments but I am unsure.

I’ve double-checked both examples, and they work as expected. However, since we currently only provide the JavaScript snippets, I think including a minimal HTML wrapper for each example would make it easier for readers to follow along. Especially for the iText example.

I think that makes a lot of sense. Please add that too.

Copy link
Member

@epanholz epanholz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The guides look really good now. I requested one round of small changes, after that it should be ready for merging.


> [!note] Important
> Please note that this has to be done in two steps, so the resources are loaded in a separate session from the full workflow.
This must be done in two steps,so the resources are loaded in a separate session from the full workflow. See [here](/docs/reference/cheerpjInit#preloadresources) for more information.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This now makes it seem that the preloadResources initOption must be added in two steps, it's a bit confusing. We should make it clear that users need to call cjGetRuntimeResources in one session and then add preloadResources to another session.

```

The JavaScript console may enclose the string between quotes (`"`), which you should ignore. See [here](/docs/reference/cjGetRuntimeResources) for more information.
The console may wrap the output in quotes (`"`). If it does, ignore the quotes. See [here](/docs/reference/cjGetRuntimeResources) for more information.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rewrite this a bit to include what reference we are pointing to, something like this:

You can read more about the cjGetRuntimeResources here [link]


> [!note] Important
> Please note that this has to be done in two steps, so the resources are loaded in a separate session from the full workflow.
This must be done in two steps,so the resources are loaded in a separate session from the full workflow. See [here](/docs/reference/cheerpjInit#preloadresources) for more information.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also rewrite the last bit to include what reference we are pointing to, something like this:

You can read more about the preloadresources init option here [link]

});
```

Next, in `index.html`, we include CheerpJ and `script.js`, provide a “Generate PDF” button, and display the resulting PDF directly in the page using an `<iframe>`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great already. I would just quickly point out that the HTML page needs to include the public loader.js script. Please add this above both the new HTML page examples.

@rijulshrestha
Copy link
Contributor Author

I've added blockquotes for both doc references and while pointing out that they need to reference loader.js script on the HTML pages. Let me know if you would like that removed and just merge it to the paragraphs above.

@rijulshrestha rijulshrestha requested a review from epanholz March 4, 2026 15:19
@rijulshrestha rijulshrestha requested a review from epanholz March 4, 2026 16:21
Copy link
Member

@epanholz epanholz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me now, thanks a lot Rijul.

@epanholz epanholz merged commit 4febb48 into main Mar 5, 2026
6 checks passed
@epanholz epanholz deleted the revamp-docs branch March 5, 2026 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants