danfickle / danfickle/openhtmltopdf

"Fast" Renderer: Rotated Text in margins is no longer placed correctly

Open
#479 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.2k
Forks
423
PR merge metrics
No merged PRs in 30d

Description

While investigating #477 I noticed that the "fast" renderer does not correctly place rotated text in the margins.

I.e. apply this patch
```
Index: openhtmltopdf-examples/src/main/java/com/openhtmltopdf/freemarker/FreeMarkerGenerator.java
===================================================================
--- openhtmltopdf-examples/src/main/java/com/openhtmltopdf/freemarker/FreeMarkerGenerator.java (revision e59bb3652cdeee8bd5721b6913054c129bd3d0a3)
+++ openhtmltopdf-examples/src/main/java/com/openhtmltopdf/freemarker/FreeMarkerGenerator.java (date 1589386191821)
@@ -97,6 +97,7 @@
builder.useSVGDrawer(new BatikSVGDrawer());
builder.useMathMLDrawer(new MathMLDrawer());
builder.addDOMMutator(LaTeXDOMMutator.INSTANCE);
+ builder.useFastMode();
builder.usePDDocument(new PDDocument(MemoryUsageSetting.setupMixed(1000000)));
builder.useUriResolver(new DefaultUriResolver() {
@Override
```

and then run the FreeMarkerGeneratorTest. In the resulting PDF the rotated "FEATURED DOCUMENTATION" is placed within the page:
![image](https://user-images.githubusercontent.com/711674/81837582-53d56f00-9545-11ea-87e3-86f390227ea5.png)
It should be correctly in the margin as with the old slow mode. Something broke here.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.