搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

In column layout "Save to PDF" fills columns differently from display.

  • 無回覆
  • 0 有這個問題
  • 7 次檢視
more options

I am trying to print html as a book using Paged.js and discovered that fonts are rendered slightly narrower when processing "Save to PDF", which means more characters fit on one line leaving too few characters for the last line on the page to justify, making it too stretched out.

Looking for the root of the problem I made a simple page with multi-column layout and "Save to PDF" breaks up the text differently there, too.

CSS for it is:

 width: 500px;
 column-count: 4;
 column-width: 100px;
 font-family: Arial, sans-serif;
 text-align: justify;
 text-justify: inter-character;

In the picture is a screenshot of the display at the top and screenshot of the pdf below. They came at different resolutions so I aligned them as best as I could. In this case browser puts "ex ea commodo" in the second column on one line but in pdf "commodo" goes onto the next one.

I am trying to print html as a book using Paged.js and discovered that fonts are rendered slightly narrower when processing "Save to PDF", which means more characters fit on one line leaving too few characters for the last line on the page to justify, making it too stretched out. Looking for the root of the problem I made a simple page with multi-column layout and "Save to PDF" breaks up the text differently there, too. CSS for it is: width: 500px; column-count: 4; column-width: 100px; font-family: Arial, sans-serif; text-align: justify; text-justify: inter-character; In the picture is a screenshot of the display at the top and screenshot of the pdf below. They came at different resolutions so I aligned them as best as I could. In this case browser puts "ex ea commodo" in the second column on one line but in pdf "commodo" goes onto the next one.
附加的畫面擷圖