Twindle: Fixing PDF page break

Created on 7 Nov 2020  路  21Comments  路  Source: twindle-co/twindle

I'm working on some things for this.

bug enhancement

All 21 comments

I am trying to change the design of pdf rendering, anyway to see the changes being made to .hbs file design while I am making it?

@vasudeveloper001 I spent lot of time working with the hbs file, and the closest I could come was generating a html file in the temporary folder, editing styles in the devtools and the applying them.

Otherwise, it'a all re-running the bloody thing over and over.

That's what I am trying to do. Generate a temporary HTML file. How to do that?

It's already generating on every single build. If you're on Windows, OPen Windows explorar, enter %temp% in the address bar, the temp folder will open. Scroll down, and you'll see a hello.html there.

Thanks. Got it.

It's already generating on every single build. If you're on Windows, OPen Windows explorar, enter %temp% in the address bar, the temp folder will open. Scroll down, and you'll see a hello.html there.

What about other OSes @PuruVJ

You'll have to Google "[INSERT YOUR OS NAME HERE] temperory folder"

I meant, is it implemented for other OSes too. I checked in /tmp on my linux machine and it is there. Perhaps add a flag to avoid creating that file for normal execution without dev mode?

Yes it is implemented for all OSs (uses tmpdir() from os module)

Perhaps add a flag to avoid creating that file for normal execution without dev mode?
Hmm I think that would be better, and we should generate it in that folder itself, gitignored

@tolgaerdonmez any updates?

@tolgaerdonmez Are you still working on it? Or is it nearly finished? I would love to hop on and understand what sort of page break improvement is needed there. I have some design related enhancement points as well which I would like to discuss.

@tolgaerdonmez any updates?

I couldn't find any time to look any further to this, while dealing with other things, but I have a question on my mind?

Why do we simply make the pdf one page? It doesnt need to be paged I think.

@tolgaerdonmez any updates?

I couldn't find any time to look any further to this, while dealing with other things, but I have a question on my mind?

Why do we simply make the pdf one page? It doesnt need to be paged I think.

PDfs are already paged by default. I don't think we have much say in the matter.

@tolgaerdonmez are you suggesting that we might provide custom dimensions for the pdf? Can we make it a single long page? 馃槻

Why couldn't we ?

I think I found something https://stackoverflow.com/questions/59891836/print-one-long-page-pdf-using-puppeteer

Off course, I still think printing one single page would be suboptimal, as kindle will try to show that 1 page all at once, and will zoom out everything to the point of unreadability

Please no to single page.

Or we'd need to do some preprocessing while emulating the page in print mode, manually set dimensions on images and such to make them fit in one page, copy that markup, replace the page's own markup with the new one, then print it.

I'm thinking this issue is better left to the last 馃樁

Let's say we have 100 tweets thread. How many pages are we talking about here in that case? 100?

Depends on how long each tweet is. This includes images, embedded tweets, line breaks, etc

Was this page helpful?
0 / 5 - 0 ratings