Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 119bca5

Browse files
committed
PDF readme
1 parent ca722ed commit 119bca5

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

pdf/README.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,17 @@ Printing to PDF
1414
### Normal PDF
1515
* Open `index.html` in text editor and first remove element `<p><br></p>` before the `<h1>Libraries</h1>`.
1616
* Then replace the index and footer with contents of `pdf/index_for_pdf.html` file and save.
17-
* Change brightness of comments by right clicking on them and selecting inspect. Then click on the rectangle that represents color and toggle the color space to HSLA by clicking on the button with two vertical arrows.
17+
* Disable internet connection and open the file in Chrome with 'Cache killer' extension enabled.
18+
* Change brightness of comments by right clicking on one of them and selecting inspect. Then click on the rectangle that represents color and toggle the color space to HSLA by clicking on the button with two vertical arrows.
1819
* Change lightness (L) percentage to 77%.
19-
* Open `index.html` in Chrome and select 'Print...'.
20-
* Select destination 'Save as PDF', paper size 'A4', customised margins of top 10mm, right 9.5mm, bottom 5mm and left 10mm, 'Default' scale and no headers and footers and save (the document should be 51 pages long with last page empty).
20+
* Select 'Print...' with destination 'Save as PDF', paper size 'A4', 'Default' margins (top 10mm, right 9.5mm, bottom 8mm and left 10mm), 'Default' scale and no headers and footers and save (the document should be 51 pages long with last page empty).
21+
* Check if plots were rendered correctly.
2122

2223
### PDF optimized for laser color printing
2324
* Run `./parse.js` again.
2425
* Open `index.html` in text editor and first remove element `<p><br></p>` before the `<h1>Libraries</h1>`.
2526
* Then replace the index and footer with contents of `pdf/index_for_pdf_print.html` file.
27+
* Disable internet connection and open the file in Chrome with 'Cache killer' extension enabled.
2628
* Change all links in text to normal text and optionally add a page number in brackets like that: '(p. <num>)'. Links can be found with this regex: `<strong>.*a href.*</strong>`.
2729
* Save and open `index.html` in Chrome.
2830
* Change brightness of elements by right clicking on them and selecting inspect. Then click on the rectangle that represents color and toggle the color space to HSLA by clicking on the button with two vertical arrows.
@@ -35,19 +37,21 @@ Printing to PDF
3537
* 58% for the comments.
3638
* Individually change brightness of every comment line that starts with: `# $ pip3 install
3739
...` and of comments in basic script template to 57%, by adding `color: hsla(0, 0%, 57%, 1);` to their element.style.
38-
* Select 'Print...' with destination 'Save as PDF', paper size 'A4', customised margins of top 10mm, right 9.5mm, bottom 5mm and left 10mm, 'Default' scale and no headers and footers and save (the document should be 51 pages long with last page empty).
40+
* Select 'Print...' with destination 'Save as PDF', paper size 'A4', 'Default' margins (top 10mm, right 9.5mm, bottom 8mm and left 10mm), 'Default' scale and no headers and footers and save (the document should be 51 pages long with last page empty).
41+
* Check if plots were rendered correctly.
3942

4043
Adding headers and footers to PDF (the same for both files)
4144
-----------------------------------------------------------
4245
* Open the PDF file in Adobe Acrobat Pro DC.
43-
* Select 'Organize Pages' tab and remove last empty page.
46+
* Select 'Organize Pages'.
4447
* Right click on one of the pages and select 'Crop Pages...'.
45-
* In 'Change page size' section select 'A4' for 'Page Sizes' set 'XOffset' to '0.1 in' and select page range All.
46-
* Select 'Edit PDF' tab and add headers and footers by clicking 'Header & Footer' button, selecting a preset from 'Saved Settings' dropdown menu and clicking ok. Repeat the process for each preset.
47-
* If presets get lost, the font and the margins are as follow: Borders: left-line: 0.6, left-text: 0.8, top-line: 11.4, bottom-text: 0.27, right-text-odd: 0.57, font-name: menlo, font-size: 8.
48-
* Set title and author by selecting 'File/Properties...'.
49-
* Save the progress by running 'Save as' in 'Adobe PDF format'.
50-
* Run 'Save as' again, this time in 'Adobe optimized format', so that Menlo font error gets fixed.
48+
* Select units: 'Inches'.
49+
* In 'Change page size' section select 'A4' for 'Page Sizes' and set 'XOffset' to '0.1 in'. Then click on 'YOffset' input field, so the x offset gets registered. Select page range 'All' and click OK.
50+
* Select 'Edit PDF' tab and add headers and footers by clicking 'Header & Footer' button, selecting a preset from 'Saved Settings' dropdown menu and clicking ok. Repeat the process for each preset. (If presets get lost, the font and the margins are as follow: Borders: left-line: 0.6, left-text: 0.8, top-line: 11.4, bottom-text: 0.27, right-text-odd: 0.57, font-name: menlo, font-size: 8.)
51+
* Select 'Organize Pages' tab and remove last empty page.
52+
* Set title to 'Comprehensive Python Cheatsheet' and author to 'Jure Šorn' by selecting 'File/Properties...'.
53+
* Save the progress by running 'Save as' in Format: 'Adobe PDF Files'.
54+
* Run 'Save as' again, this time in 'Adobe PDF Files, Optimized', so that Menlo font error gets fixed.
5155

5256
Printing the PDF
5357
----------------

0 commit comments

Comments
 (0)