How to Save a Topic From This Forum as a PDF?

While I agree that we should be able to create a PDF of the full topic, it does not seem likely that the Discourse developers have any interest in providing this feature.

So, as a pretty good workaround, I have found that using the Evernote Web Clipper of selected posts within a topic to meet virtually all of my needs. This captures the key parts of the thread, as well as providing a link back to the full thread, should you need it.

Once you have sync’d your EN Mac app with the EN Cloud, you have everything you will likely need, even if you can’t access the Internet.

I should note that I use almost exclusively the Chrome Browser, and Evernote Clipper on that browser. I think the EN Safari Clipper works just as well, but I can’t personally testify to that.

Yeah, I typed, deleted, and retyped quite a few times before I actually posted a response. Glad I did, because they did end up trying to be helpful.

Honestly, my post could have been taken as an attack - I regularly put my foot in my mouth. So don't hold it against them.

Much.

@ccstone, @JMichaelTX

It looks like the Discourse people are finally implementing this feature. I admit that I haven’t read the latest posts on the subject, but I get sent an email for them, and a very cursory glance indicates it’s being worked on.

Thought I’d let people know.

2 Likes

Implemented, or not yet?

I like that idea.
But when I tried to print from Discourse just now, blank pages (with headers & footers.)

To get past screen printing, I clipped to DevonThink as a web archive.
From there, direct to printer -- no PDF needed.

Below are first and last pages printed.
Seems to have captured everything.

Not everyone has DevonThink, but this shows it can be done, rather quickly and easily.
How to do it without DevonThink I don't know.
Korm?



Hey Mark,

I tried clipping the same page you did with DEVONthink Pro Office.

I then turned my network OFF and tried to run through all the postings on the page.

I found duplications and a failure to produce latter parts of the page.

How did you initiate the clipping? I did mine through the share menu.

-Chris

Initiated "Clip To DevonThink" bookmarklet in Firefox.
Screen print below.

I did not think to use Instapaper, but that might work even better.

I don't suggest anyone buy DevonThink just for this use.
But if DevonThink can do it, then certainly could be done another ways.

What was the purpose of turning off your network?

Hey Mark,

Because the Discourse forum software uses JavaScript to dynamically load about 20 posts at a time, therefore a webarchive will try to load from the web as you page through it – and you may see posts that actually don't show up in the webarchive itself.

-Chris

Ah, now I understand about the network.

This what I did on my second trial:

Clip to Devonthink ➼ DevonThink Web Archive ➼ Convert to PDF (inside DT) ➼
Export Document (from DT) to desktop

It looks pretty, like the Discourse web page, but it’s not all there.
Final 20% disappeared.
Maybe because I specified one page PDF; maybe some other reason.

On this forum I can’t seem to upload a PDF to show you.
Is there some way to upload a PDF?

Hey Mark,

I just used Firefox and the bookmarklet to clip to DEVONthink Pro Office and ended up with another fouled up webarchive.

It’s the dynamic loading that’s the problem.

That’s why we need the Discourse software itself to produce a proper printing (or PDF) of the whole thread.

-Chris

1 Like

Hey Mark,

Sure. Zip it.

-Chris

Zipped:

How to pass variable from applescript to km - general - Keyboard Maestro Discourse-1.pdf.zip (271.3 KB)

Hey Mark,

I looked at your PDF, and you’re having the exact same problems I am.

“How to pass variable from applescript to km”

You’ll find it and other posts to the thread are in the PDF twice. (More strangeness from the dynamic paging of the forum.)

-Chris

1 Like

Here is another attempt to solve the problem, "How to PDF a topic from this forum?"

@danthomas, and others, please check if the PDF below is correct and complete, or not.

If problem solved, I'll explain the method.

If not solved, I'll keep trying, because this would be very useful, immediately, without any waiting for Discourse to do something.

Link to PDF download:

Test 2016-10-31 How to pass variable from applescript to km.pdf.zip (355.8 KB)
.


.
Note 1:
My method depends on a Firefox add-on.
I don't know about other browsers.

Note 2:
The title of the PDF -- "pass variable from applescript" -- is not relevant here.
It is just the title of a long topic used for this test.
Here is the link to that topic:
https://forum.keyboardmaestro.com/t/how-to-pass-variable-from-applescript-to-km/1453/36

I don't usually revive old topics but I found a very simple solution to this on the Discourse forum.

I often want to save KM discussions as PDFs into my own knowledge base for off-line reading etc, but up until now I I have not been able to do so using the standard methods like Export to PDF or using Command-P which don't work for long topics.

So, after searching the Discourse support forum I found this solution: while reading a topic just press Control-P which brings up the standard print dialog. From there you can (obviously) print or save to PDF or send to...

Note, this uses the Control key and NOT the Command key and this process creates a new window which you have to close afterwards.

3 Likes

Cool. Sounds like it should be a, um, macro :wink:!

Interestingly, now, Command P brings up a new window that drops down a standard print dialog with the save as pdf option working perfectly for this topic by creating an 18 page pdf BUT if I do this while the cursor is in this editing window I'm writing this in, a standard print sheet drops down from this current window which produces a blank 18 page pdf.

Typing Control P now moves the cursor up one line in either this editing window or scrolls up one line if the cursor is in the body of the topic.

This is in Safari running MacOS 10.15.6.

Guess the code is continuing to be edited.

Thanks for pointing that out @BernSh as I was starting to wonder why my Control-P wasn't working any more! I think you're right that someone, somewhere is still tweaking the Discourse code.

Hey Folks,

  • Open the page in Safari.
  • Disable JavaScript in the Develop menu.
  • Save as a WebArchive file.
  • View in Safari or TextEdit.
  • Editable in TextEdit.

I have a script that auto-saves to specific directories using the domain as a filter.

This should get everything including embedded text and scripts.

I used to know how to directly edit a webarchive file, but unfortunately I've forgotten...

-Chris

I just ran some tests, and it looks like my webarchive downloader macro can do the job for the Keyboard Maestro Forum. It produces a webarchive file rather than a PDF of course, but those are fully searchable via Spotlight on macOS.

Create Web Archives (Download Web Page) from a List of URLs

I'll have to make a variant to operate on the front browser page...

Confound it! I lied...

The JavaScript in the webarchive opened the live page and dynamically loaded the pages.

I had to turn off my network to test properly, and sad to say – it didn't work as I'd believed.

The method in post #38 above still works though.

-Chris

1 Like