Comments (5)
Hello, @taozhiyu! Thank you very much for your issue, I will deal with these problems soon.
from liquid.
I will investigate these problems soon to make sure the availability of export functions. Thank you for your issue.
from liquid.
I have already reproduced your two problems in your way. Here I report my survey results.
First problem
I export Demo.md to Demo.html and then I try to print Demo.html to PDF by both Chrome (version 101.0.4951.67) and Edge (version 101.0.1210.53). It's necessary to check the Background graphics bottom to render the background color and choose the Margins as None to eliminate white margins. Unluckily, there may still leave a white blank on the last page.
I tried to search for a way to solve this problem by Google, including StackOverflow, but I found no way to solve it. I also noticed that the familiar problem was asked in other software, such as GoodNotes, PDF Expert, OneNote, and so on.
Here I quote the paragraph I got when searching for the way:
No. It wouldn't make sense to have that option as no one wants to print white text on black background. However, if you simply need it for reading on a pc/smartphone, what you can do is activate the dark mode (or however it is called) in your PDF Reader.
In my opinion, the software developer and product managers maybe thought it's no sense to print white text on black background, and then refuse to develop this function in browsers and other reader software. The printer just considers anything as text or graphic and then directly print them in a white paper.
Second problem
Here is the error message when trying to print PDF in dark themes, such as Night (provided by Typora), and Liquid Dark.
Sorry, the current version does not support printing the background color when exporting PDF, so the dark theme is not supported for PDF export. Please reselect the light color theme or click "Print with default theme".
I now used Typora(version 1.2.4), and the same problem had also happened in the older version I used. Maybe this problem is just because of the function lack for Typora? (I guess)
Advice
I recommend to export markdown file to PDF in light mode, but if your still want to export markdown file to PDF in dark mode, here are 2 ways for you:
-
Export markdown file to .html file and then print it. Finally, using other application to change the color of last page, such as Adobe Acrobat;
-
Export markdown file to image and then transfer it to PDF.
Further
This issue will keep open. I will appreciate it if anyone can provide more clues. After all, this is an open-source project.
Thanks @taozhiyu for your issue.
from liquid.
Well, the first issue has passed, and I think you might have misunderstood what I meant in the second issue.
What I mean is that when using the default theme or the default dark theme, the pop-up window when exporting is displayed normally (shown below)
default theme | ![]() |
---|---|
dark theme | ![]() |
But when I use Liquid-dark
, the pop-up window will have an extra blank area, while displayed fine with Liquid
(not dark mode), shown as figure below.
PS: I wanted to frame the wrong part, but I was worried that it would affect the viewing after the frame, so I used the yellow I-shaped part to draw it.
Maybe this is indeed a problem with the software itself? I'm not very sure, I'm using version 1.3.2-dev now.
from liquid.
OK, I have already solved this second problem @taozhiyu .
When Typora tries to export PDF, there will be two layers of bars in which the first one displays the text "Exporting" while the second one is just empty no matter which theme or version.
The difference between the bars and background in color is just because the --bg-color
isn't staying the same with the background
color setting in the body
.
Due to this problem doesn't affect the export function, this bug fix will release with other enhancements.
from liquid.
Related Issues (9)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from liquid.