Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q: Is there a way to capture/print/export hydrogen output area? #1080

Open
dsanalytics opened this issue Nov 2, 2017 · 4 comments
Open

Q: Is there a way to capture/print/export hydrogen output area? #1080

dsanalytics opened this issue Nov 2, 2017 · 4 comments
Labels
enhancement 🌟 New feature ideas good first issue Good for new contributors help wanted Help is desired

Comments

@dsanalytics
Copy link

dsanalytics commented Nov 2, 2017

Is there a way to capture/print/export hydrogen output area? Simple print option would do for I have pdf printer, but it seems that Atom is lacking in that department greatly. Any suggestions/ideas?

Thx

@dnowacki-usgs
Copy link

Are you looking for more functionality than clicking/cmd-clicking the icon in the bottom right of the output bubble?

untitled

@dsanalytics
Copy link
Author

dsanalytics commented Jan 16, 2018

@dnowacki-usgs - allow me to clarify:

  1. Copy to clipboard is only available when clock icon is active but not with list icon (the one next to it) - i.e. when all input is available on the screen, copying all of it to clipboard is not offered. Screenshot below.
  2. Only text seems to be copied - when output contains e.g. a matplotlib chart - ctrl-copy reports 'Nothing to copy'. Screenshot below.

My printing would need to include all output (list icon option) and print everything including matplotlib charts - just as shown on the screen. I hope this clarifies it - please let me know if you'd need any other explanation.

atom-no-copy-button-annotated

atom-nothing-to-copy-message

@RaghuNaik
Copy link

It would be great if the output is automatically put in a code block.

This is standard in emacs and in statEclipse when I was using it many years ago.

This way the output is available of future sessions.

Cheers.

@wadethestealth wadethestealth added enhancement 🌟 New feature ideas good first issue Good for new contributors help wanted Help is desired labels Jun 4, 2019
@wadethestealth
Copy link
Member

keeping this here for eventually adding output to pdf

const { BrowserWindow } = require('electron').remote
const fs = require('fs')

let win = new BrowserWindow({ width: 800, height: 600 })
//win.loadURL('http://github.com')
win.loadURL('data:text/html,<span>hi</span>')

win.webContents.on('did-finish-load', () => {
  // Use default printing options
  win.webContents.printToPDF({}, (error, data) => {
    if (error) throw error
    fs.writeFile('/tmp/print.pdf', data, (error) => {
      if (error) throw error
      console.log('Write PDF successfully.')
    })
  })
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🌟 New feature ideas good first issue Good for new contributors help wanted Help is desired
Projects
None yet
Development

No branches or pull requests

4 participants