Skip to content

Commit

Permalink
Modified compression script and added instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
nitish6174 committed Jul 27, 2016
1 parent dfbabf1 commit 05ec524
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
16 changes: 4 additions & 12 deletions compress_pdf.py
@@ -1,24 +1,16 @@
import os
import sys

# dir_path = "/absolute/path/to/directory/"
dir_path = "/mnt/B4A49A87A49A4BAC/Downloads/"
dir_path = "/absolute/path/to/directory/"
# Make sure dir_path is ending in /
num_of_pages = 2
# out_file = dir_path+"14010XXXX_CV.pdf"
out_file = dir_path+"140101045_CV.pdf"
out_file = dir_path+"14010XXXX_CV.pdf"


IS_PY3 = sys.version_info[0] == 3
if IS_PY3:
_range = range
else:
_range = xrange

cmd = "gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile="+out_file
# cmd = "gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile="+out_file
for i in _range(num_of_pages):
filename = dir_path+str(i+1)+".pdf"
for i in range(1,num_of_pages+1):
filename = dir_path+str(i)+".pdf"
cmd = cmd+" "+filename

os.system(cmd)
10 changes: 10 additions & 0 deletions css/editor.css
Expand Up @@ -60,6 +60,16 @@ body {
a {
color: #666;
}
a.blue {
color: blue;
text-decoration: none;
border-bottom: 1px dotted blue;
}
a.blue:hover {
color: blue;
text-decoration: none;
border-bottom: 1px solid blue;
}

ul {
margin-left: 20px;
Expand Down
5 changes: 5 additions & 0 deletions index.html
Expand Up @@ -591,6 +591,11 @@ <h4><strong>Print as PDF</strong></h4>
<li>Adjust margin in the Chrome's print dialog box. You may need it if a section is getting split between two pages. Print each page separately with different margins if needed.</li>
<li>If URLs or some stray text is being shown in print preview, disable the options "Include headers and footers","Include background graphics" etc in the print dialog box.</li>
</ul>
<h4><strong>Merge and compress PDFs</strong></h4>
<ul>
<li>If you can run python file on your machine, see README on <a class="blue" target="_blank" href="https://github.com/nitish6174/resume-generator">project's github</a></li>
<li><a class="blue" target="_blank" href="http://www.pdfmerge.com/">pdfmerge.com/</a> is one of the best sites available for this task.</li>
</ul>
</div>

</div>
Expand Down

0 comments on commit 05ec524

Please sign in to comment.