Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document htmlbox #2895

Merged
merged 1 commit into from
Dec 14, 2023
Merged

Document htmlbox #2895

merged 1 commit into from
Dec 14, 2023

Conversation

JorjMcKie
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@jamie-lemon jamie-lemon left a comment

Choose a reason for hiding this comment

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

Two typos, the rest is pretty subjective, although I do think removing the forced scaling on the images in the example page makes things look better ( although I am on a laptop )

docs/page.rst Outdated Show resolved Hide resolved
docs/page.rst Outdated
* With this method the following can be achieved:

- Styling effects like bold, italic, text color, text alignment, font size or font switching.
- The text may inlude arbitrary languages -- **including rigt-to-left** languages.
Copy link
Collaborator

Choose a reason for hiding this comment

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

typo: rigt -> right

docs/page.rst Outdated Show resolved Hide resolved
docs/page.rst Outdated Show resolved Hide resolved
.. image:: images/img-htmlbox1.*
:scale: 30

Here is another example that outputs a table with this method. This time, we are including all the styling in the HTML source itself. Please also not, how it works to also include an image - even within a table cell::
Copy link
Collaborator

Choose a reason for hiding this comment

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

typo: not -> note
Also I don't think it needs the comma after "Please also note ..." as it is all one sentence flow.

The result will look like this:

.. image:: images/img-htmlbox1.*
:scale: 30
Copy link
Collaborator

Choose a reason for hiding this comment

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

In my opinion, this image looks much better without the scale forcing the size.

[7, 'n/a', 'Type1', 'Helvetica', 'HElv', 'WinAnsiEncoding']
[8, 'n/a', 'Type1', 'Helvetica', 'HELV', 'WinAnsiEncoding']
.. image:: images/img-htmlbox3.*
:scale: 50
Copy link
Collaborator

Choose a reason for hiding this comment

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

In my opinion, this image looks much better without the scale forcing the size.

The result will look like this:

.. image:: images/img-htmlbox2.*
:scale: 30
Copy link
Collaborator

Choose a reason for hiding this comment

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

In my opinion, this image looks much better without the scale forcing the size.

docs/page.rst Outdated
@@ -664,7 +664,7 @@ In a nutshell, this is what you can do with PyMuPDF:
:arg rect_like rect: rectangle on page to receive the text.
:arg str,Story text: the text to be written. Can contain plain text and HTML tags with styling instructions. Alternatively, a :ref:`Story` object may be specified (in which case the internal Story generation step will be omitted). A Story must have been generated with all required styling and Archive information.
:arg str css: optional string containing additional CSS instructions. Ignored if "text" is a Story.
:arg bool scale: if necessary scale down the content until it fits in the target rectangle.
:arg float scale_low: if necessary scale down the content until it fits in the target rectangle. This sets the down scaling limit. Detault is 0, no limit. A value of 1 means no down-scaling. A value of e.g. 0.2 means maximum down-scaling by 80%.
Copy link
Collaborator

Choose a reason for hiding this comment

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

typo: "Detault"

@julian-smith-artifex-com julian-smith-artifex-com merged commit 27ff042 into main Dec 14, 2023
2 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 14, 2023
@JorjMcKie JorjMcKie deleted the document-htmlbox branch December 14, 2023 22:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants