Skip to content

Instantly share code, notes, and snippets.

@marioluan
Last active June 23, 2023 13:05
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save marioluan/9eb40f1e8fddbfd7edc7ff5164f019a8 to your computer and use it in GitHub Desktop.
Save marioluan/9eb40f1e8fddbfd7edc7ff5164f019a8 to your computer and use it in GitHub Desktop.
Export your linkedin public profile to PDF if you're having trouble with internationalization.
// Reason to create this script:
// My profile was created in portuguese, but when I translated
// it to english and tried to save my profile as PDF, it could not
// translate some words and dates to english, so I created this gist
// as an alternative.
// Usage
// 1. open your public profile in an incognito* browser tab. E.g.: https://www.linkedin.com/in/marioluan
// 2. copy-n-past the code below into the browser console
// 3. save as PDF
// 4. add me on linkedin :) (optional)
// 5. contribute to make this gist better (optional)
// * This is necessary to avoid loading private sessions
// of your profile and other unecessary stuff
// top bar
$("#header-banner").remove()
// the ones which appers below your profile picture and above your summary
// and another one which may apper at the bottom of your profile
$(".reg-upsell").remove()
// column from right
$("#aux").remove()
// expands the skills section
$("[for=skills-expander-state-checkbox]").click()
// removes the 'see less' button
$("[for=skills-expander-state-checkbox]").remove()
//recommendations section
$("#recommendations").remove()
// groups section
$("#groups").remove()
// volunteering section
$("#volunteering").remove()
// linkedin member directory
$("#directory").remove()
// page footer
$("#layout-footer").remove()
// triggres the print command, so you can save as PDF
window.print();
@FeoSilva
Copy link

Doesn't works :(

@cesardmoro
Copy link

yeah, its outdated

@rafaelparenza
Copy link

error:
Cannot read properties of null (reading 'remove')

@marioluan
Copy link
Author

Linkedin now has a feature to build resumes [1].
This script is not needed anymore, but thanks for the feedback.

[1] https://www.linkedin.com/help/linkedin/answer/94034/linkedin-resume-builder?lang=en

@murillojndem
Copy link

Linkedin only allows building resumes to pdf using your main profile language.

@tiagomaricate
Copy link

Dude, please, update this script.
LinkedIn Don't do what your script do.
They only allow export the main profile language.

@rafaelparenza
Copy link

So far, there is no linkedn solution to download the curriculum in different languages.

@haldirleao
Copy link

I was trying hard to make it at LinkedIn. Unfortunately I couldn't! 😞
PS.: main profile in PT-BR, secondary one in EN-US.

@FelipeCorso
Copy link

I managed to update it https://gist.github.com/FelipeCorso/c1292db08a55986fb7c2cf191eb71f9a
I've tested it with some different profiles, might not be perfect, suggestions are welcome 😄.

@tiagomaricate
Copy link

I managed to update it https://gist.github.com/FelipeCorso/c1292db08a55986fb7c2cf191eb71f9a I've tested it with some different profiles, might not be perfect, suggestions are welcome 😄.

I get this error:

VM119:6 Uncaught TypeError: Cannot read properties of null (reading 'remove')
at :6:37

@FelipeCorso
Copy link

I sent an update, lemme know if you have any problem.
Thanks for pointing that ✌️

@lcsmil
Copy link

lcsmil commented Apr 7, 2023

I sent an update, lemme know if you have any problem. Thanks for pointing that ✌️

Not working here, it says Uncaught TypeError: Cannot read properties of null (reading 'children') at :58:60

@rafaelparenza
Copy link

@FelipeCorso
Copy link

@lcsmil Thank you for reporting, and sorry for the delay!
I tested with your profile, and it seems to be working. Nevertheless, I added a condition on that part you mentioned.
Remember to follow the instructions at the top of the document.

// Usage
// 1. Open your public profile in an incognito* browser tab. E.g.: https://www.linkedin.com/in/felipe-corso
// 2. Copy-n-past the code below into the browser console
// 3. Save as PDF
// 4. Add me on LinkedIn :) (optional)
// 5. Contribute to make this Gist better (optional)

// * This is necessary to avoid loading private sessions
// of your profile and other unnecessary stuff

// Print Info
// To remove the date, page title, URL and page number
// uncheck the option "Headers and footers" on print pop-up
// More details: https://www.geeksforgeeks.org/how-to-remove-url-from-printing-the-page/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment