LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-16-2016, 11:50 PM   #1
Sefyir
Member
 
Registered: Mar 2015
Distribution: Linux Mint
Posts: 531

Rep: Reputation: 239Reputation: 239Reputation: 239
Change size of post-script file


I'm trying to double the size of the output of sudoku (program)
You can get one yourself to try (also put in code at bottom)

Code:
sudo apt-get install sudoku
sudoku -fpostscript -c"hard" > board_1
The problem is the output board is very small!
I'm trying to double the size but my results are blurry when converted to pdf.
My goal is to print them out in a easier-to-read size.

Code:
convert board_1 -scale 200% board_1.pdf
I think I'm going around this the wrong way since it's just a postscript file - I should be able to change the size any amount without any blurriness.

Code:
%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 211 301 401 491
%%Creator: Sudoku by Michael Kennett
%%CreationDate: Tue Aug 16 20:32:31 2016
%%Title: randomly generated - hard
%%EndComments
(9     25 7   39 1  1          4 36   589 247   41 7          8  3 52   4 69     2)
211 301 translate
0 setgray
1 setlinewidth 1 8 {dup 20 mul 5 add dup dup dup
  5 moveto 185 lineto 5 exch moveto 185 exch lineto 1 add} repeat pop stroke
3 setlinewidth 1 2 {dup 60 mul 5 add dup dup dup
  5 moveto 185 lineto 5 exch moveto 185 exch lineto 1 add} repeat pop stroke
1 setlinejoin 5 5 moveto 5 185 lineto 185 185 lineto 185 5 lineto closepath stroke
/Helvetica-Bold findfont 12 scalefont setfont
0 81 {2 copy 1 getinterval dup stringwidth pop
  20 exch sub 2 div 2 index 9 mod 20 mul add 5 add
  8 3 index 9 idiv sub 20 mul 10 add
  moveto show 1 add} repeat pop pop
 
Old 08-18-2016, 09:11 AM   #2
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,293

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Hi

Making PDF files with ImageMagick is not so good. It will change it to bitmap. It's better to use epstopdf which keep it as vector graphics.

Code:
sudo apt-get install sudoku texlive-font-utils
sudoku -g -fpostscript -c"hard" | epstopdf --filter >board_1.pdf
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there reliable way to change size or location of X11 window in shell script? *Dark Dragon* Programming 4 05-31-2014 07:37 AM
Basic bash script question re: file size or # of lines in a file the_fornicator Programming 6 09-03-2009 10:41 AM
Can you write a script to display file name, Inode, and size of any file? JaxsunApex Linux - Newbie 3 01-30-2007 09:39 AM
Create a script to display file name, Inode, and size of any file. Has to be a script JaxsunApex Linux - Newbie 7 01-29-2007 09:15 PM
HowTo Change swap file size gee Linux - Newbie 2 02-26-2004 09:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration