LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 10:50 PM   #1
Sefyir
Member
 
Registered: Mar 2015
Distribution: Linux Mint
Posts: 634

Rep: Reputation: 316Reputation: 316Reputation: 316Reputation: 316
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, 08:11 AM   #2
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,453

Rep: Reputation: 447Reputation: 447Reputation: 447Reputation: 447Reputation: 447
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



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 06:37 AM
Basic bash script question re: file size or # of lines in a file the_fornicator Programming 6 09-03-2009 09:41 AM
Can you write a script to display file name, Inode, and size of any file? JaxsunApex Linux - Newbie 3 01-30-2007 08: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 08:15 PM
HowTo Change swap file size gee Linux - Newbie 2 02-26-2004 08:40 PM

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

All times are GMT -5. The time now is 08:14 PM.

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
Open Source Consulting | Domain Registration