Horizontal overflow not disabled when printing with a third-party preview theme

In preview, the container of code snippets are scrollable.

However, export to pdf, the code is truncated

I have to to this:
1> export to html
2> modify html content to below

.mde-preview pre > code {
  padding: 0;
  margin: 0;
  font-size: 100%;
  **word-break: break-all;**
**  white-space: pre-wrap;**
  background: transparent !important;
  border: 0;

3> use chrome, convert html to pdf

Can we have an option to do this automatically? Thanks.

Hi Gogdizzy,

Thank you for the report.
That’s weird. The behavior you’d expect should work fine in exported pdfs.
I confirmed that word-wrapping works well:

So, I can’t reproduce the issue. What is your environment?

OS: macOS Mojave 10.14.6
InkDrop ver: 5.2.1
And with plugins:

Maybe any plugin conflict?

I closed all plugins but ‘export-print’, and export to pdf still not ok,result is

Thanks for the information.
Do you use github-markdown (built-in) for preview theme?
It already has a CSS for print like so:

@media print {
  .mde-preview table {
    overflow: hidden;
    word-break: break-word;
  .mde-preview pre > code {
    word-wrap: break-word;
    white-space: pre-wrap;

I have run into the same issue, didn’t know that the theme played a role in that. Just checked again and can’t reproduce it.

Currently using:

  • Dracula Dark UI for UI Theme
  • Horizon Dark Syntax for Syntax Theme
  • Dracula Preview for Preview Theme

Don’t remember which themes I used when I ran into that issue. However, can confirm that it also happened on my end.

Thank you.
Yes, the Github-Preview is OK.
I used Colorfi preview before. because i think colorfi is very beautiful.

I followed the doc, copy the css code to “~/Library/Application\ Support/inkdrop/styles.less”
It works.

Now I can use Colorfi preview and export to PDF with wrapping.

Looks like the style should be built-in to the app itself! I’ll fix it in the next release.
Thanks again for reporting, @Nicole_Daniella and @gogdizzy_dizzygog :smiley:

Fixed in v5.3.0🎉 Thanks again for the report.