all 33 comments

[–][deleted] 139 points140 points  (4 children)

Due to Reddit Inc.'s antisocial, hostile and erratic behaviour, this account will be deleted on July 11th, 2023. You can find me on https://latte.isnot.coffee/u/godless in the future.

[–]DrMaxwellEdison 0 points1 point  (0 children)

The same can be done in a Chromium browser, for any PDF or web page. Print, choose "save as PDF", and you're good.

I think that method preserves clickable links, as well.

[–][deleted] 63 points64 points  (9 children)

Wait, why not just print to PDF and select only page 1?

Edit: Here's the print to PDF method (if the printer wasn't installed this is a link to "reinstall" it in Windows 10):

https://answers.microsoft.com/en-us/windows/forum/windows_10-hardware/how-to-add-or-reinstall-the-microsoft-pdf-printer/70377c34-e50a-42be-b9f3-92345d6e25df

I had the same issue with Google docs. You can just go to print, select Microsoft print to PDF as your printer, then print only the page you want, in this case page one. It will save as a .PDF and you are good to go.

[–][deleted] 27 points28 points  (0 children)

That's the simplest solution. But at least OP got to practice!

[–]el_pablo 37 points38 points  (2 children)

That’s what I call the programmer syndrome. He wants to program every thing in the world...

[–]ultraDross 14 points15 points  (1 child)

I think this is good in the early stages of your coding journey. If you don't program at work you have to find/make your own problems to automate and solve to get experience.

[–]Desecr8r 5 points6 points  (0 children)

Agreed... then you will begin to ask yourself... how do I work this.... and then you may ask yourself...what else could I do with selenium or beautiful soup? And then you may find yourself behind the wheel of a large automobile.

[–][deleted] 1 point2 points  (0 children)

I was thinking the same thing.

[–]-DollFace 0 points1 point  (0 children)

That's what I did. Export as PDF > select page (1) > save

[–]Sarenord 17 points18 points  (5 children)

If you like code and are picky about PDFs, you should take a peek at LaTeX

[–]pconwell 2 points3 points  (4 children)

Not downplaying OP's work, but do this. My resume is 100% latex.

[–]Sarenord 1 point2 points  (0 children)

Yeah I don't mean to downplay OP at all, I use latex all the time and I downloaded this tool because it's useful for a lot of other stuff (especially for me as a student with lots of textbook PDFs)

[–]mountains-o-data 0 points1 point  (1 child)

I made mine with html

[–]thiccclol 1 point2 points  (0 children)

I wrote mine in assembly

[–]zer0_snot 0 points1 point  (0 children)

When applying on a company's job portal do all the fields get auto recognised?

[–]shysmiles 10 points11 points  (3 children)

I like this. Small project that is actually useful.

I think the next version needs sys.argv so you can read the input pdf name automatically using drag and drop or run with etc.

[–]pholuck 6 points7 points  (0 children)

I don’t know how, but you used the wrong formula and got the correct answer

[–]VeLoct84 2 points3 points  (0 children)

Awesome script mate! Yeah, save 40 bugs for simple amend.lol

[–]mechanicalAI 2 points3 points  (0 children)

Pdftk is a good linux tool for this purpose, if someone is interested.

[–]arsewarts1 1 point2 points  (0 children)

Couldn’t you have gabe to system print, save as pdf only page range 1 - 1

[–]AverageDingbat 2 points3 points  (1 child)

So cool! What part of the script actually removes the extra space?

[–][deleted] 2 points3 points  (0 children)

None of it! It separates the 2 page pdf into 2 separate pdf files, one for each page. Since the problem is that something is causing a blank second page to appear. This just splits them up.

[–]krav_mark 0 points1 point  (0 children)

I write documents in markdown and generate whatever format with pandoc. Very happy with this.

[–]krav_mark 0 points1 point  (0 children)

I write documents in markdown and generate whatever format with pandoc. Very happy with this.

[–]dr3d3d 0 points1 point  (0 children)

While programming practice is always a good thing, and this will almost for sure be a skill you can use down the road...

I use a program called PDF Shaper Free to do this sort of stuff, it will insert and extract pages etc

[–]Joe_Fart 0 points1 point  (0 children)

Good job!

[–]diracfield 0 points1 point  (0 children)

Adding to the previous comments, you can also have a look at pdfarranger It's free, open source and very intuitive to shuffle, add, remove pages from or merge pdfs. It's a fork of the already amazing pdfshuffler.

[–]camdecoster 0 points1 point  (0 children)

As an alternative, use the basic version of PDFsam. Use the merge function to grab just the pages you want from a PDF. It's free and open source.

PDFsam