-
Notifications
You must be signed in to change notification settings - Fork 56
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
Missing spaces at single hard returns in PDFs #1856
Comments
@hillaryfraley this may be an Adobe Acrobat bug. The generated HTML is correct...As you noticed, it looks like Acrobat is interpreting |
@rnevius thank you for investigating. I will test to see how onerous it is to manually rip and replace all the newlines with a space. |
@rnevius Is https://wkhtmltopdf.org/ still a viable option for automating PDF generation for the docs site? It looks like the newline thing isn't an issue in wkhtmltopdf. |
@hillaryfraley wkhtmltopdf isn't a good fit (as far as I can tell)...I did some tests and internal links / Table of Contents are completely broken. There are also some weird rendering bugs (different than the ones pointed out in this issue and others). I also did some testing a few weeks ago with an automated PDF build script using Puppeteer. Using Puppeteer would be awesome, as it builds offline docs exactly how they appear in Chrome (using the offline layouts). But like wkhtmltopdf, Puppeteer also has issues with the internal links, so this script isn't useful at the moment. It may be possible to rewrite the offline docs layouts so that the site would act like a single-page template/site. In other words, all content for a given Sensu version would appear on one "page". If that's possible (I'd have to investigate), we could use Puppeteer to automate the PDF builds... Thoughts about all of this? |
@rnevius thanks for the update. Can you provide a time estimate on a spike for this approach with Puppeteer? I would like to improve this offering for offline use but for the time being would prefer to live with the current limitations rather than invest much more than a few hours in investigating an alternative technology. |
When we generate offline PDFs according to the process described in #1779, the process seems to delete single hard returns without adding a space after terminal punctuation.
For example, if the markdown text is:
This is sentence one.
This is sentence two.
In the PDF, this text will appear as:
This is sentence one.This is sentence two.
The PDF also shows a gray box around the first letter of the second sentence at points where this happens.
This is an issue with:
Expected Behavior
The PDF conversion process should interpret single hard returns as a space between sentences. This should not apply to text that is formatted into bulleted or numbered lists.
To use the same example, if the markdown text is:
This is sentence one.
This is sentence two.
In the PDF, this text should appear as:
This is sentence one. This is sentence two.
Current Behavior
If the markdown text is:
This is sentence one.
This is sentence two.
In the PDF, this text currently appears as:
This is sentence one.This is sentence two.
...with a light gray box around the
T
in the second instance of "This"Screenshots (if appropriate):
The text was updated successfully, but these errors were encountered: