MicroPad / MicroPad-Electron

The desktop app of https://github.com/MicroPad/MicroPad-Core
Mozilla Public License 2.0
64 stars 4 forks source link

PDF export page break clipping & blank page insertion #29

Closed AndrewMD888 closed 4 years ago

AndrewMD888 commented 4 years ago

I recently noticed two bugs related to the creation of pdf files when exporting single notes as I have been using MicroPad regularly for a month now.

The first bug is that sometimes when a note is long enough to go onto two or more pages, the text is not broken up properly between the pages and it results in text on the same line being left over from one page onto the next, essentially splitting the text line in a horizontal manner. I do not know if it only occurs because of the ASCIIMath usage, as it does not happen every time and when it does occur, I've noticed it might be because of the extra vertical page spacing created when using ASCIIMath. I've attached a picture of this glitch below.

MicroPadPDFPageBreakGlitch

In addition, I have also noticed that some of my pdf exports end up with a blank first page inserted into the pdf, which means the actual content ends up beginning on page 2. The note's name is the header (as usual), but the first page being blank follows it. I don't know why this happens.

NickGeek commented 4 years ago

Interesting. I would bet that asciimath is probably causing some issues there, it's been the bane of printing for a while now.

PDF exports/printing is definitely one area of MicroPad that needs more work, https://github.com/MicroPad/Web/issues/176 is a case to improve it so I'm going to close this in favour of that.

Thanks for the report!