This wikilog article is a draft, it was not published yet.

Stampit reading from file

⇠ Back to Blog:Hacks
m (Created page with "For the PLMCN24's abstract book, I patched stampit to read information from a file as opposed to from the filename. --more-- First, in the folder of abstracts, I join...")
 
m
Line 14: Line 14:
  
 
which I burst into single pages again:
 
which I burst into single pages again:
 +
 +
<pre>
 +
pdftk full-book.pdf burst output program-booklet/pages/
 +
</pre>
 +
 +
There in this directory, I have [[stampit]] v0°2, along with <tt>stamp.svg</tt> and <tt>pages.txt</tt> which is of this type:
 +
 +
<pre>
 +
pg_0003.pdf 1
 +
pg_0004.pdf 2
 +
pg_0005.pdf 3
 +
pg_0006.pdf 4
 +
pg_0007.pdf 5
 +
pg_0008.pdf 6
 +
pg_0009.pdf 7
 +
pg_0010.pdf 8
 +
pg_0011.pdf 9
 +
pg_0012.pdf 10
 +
pg_0013.pdf 11
 +
pg_0014.pdf 12
 +
pg_0015.pdf 13 
 +
pg_0016.pdf 14
 +
pg_0017.pdf 15    
 +
pg_0018.pdf 16  S1 Invited 
 +
pg_0019.pdf 17  S1    
 +
pg_0020.pdf 18  S1    
 +
pg_0021.pdf 19  S1         
 +
pg_0022.pdf 20  S2 Invited 
 +
pg_0023.pdf 21  S2    
 +
pg_0024.pdf 22  S2    
 +
pg_0025.pdf 23  S2         
 +
pg_0026.pdf 24  S3 Invited 
 +
pg_0027.pdf 25  S3    
 +
pg_0028.pdf 26  S3    
 +
pg_0029.pdf 27  S3         
 +
pg_0030.pdf 28     
 +
pg_0031.pdf 29  Keynote    
 +
pg_0032.pdf 30    S4 Invited 
 +
pg_0033.pdf 31    S4    
 +
</pre>
 +
 +
Then running stampit
 +
 +
<pre>
 +
./stampit
 +
</pre>
 +
 +
and reassembling (in "stamped" directory)
 +
 +
<pre>
 +
pdftk *.pdf cat output PLMCN24.pdf
 +
</pre>
 +
 +
gives the final product!

Revision as of 13:39, 3 April 2024

For the PLMCN24's abstract book, I patched stampit to read information from a file as opposed to from the filename. First, in the folder of abstracts, I join all of them:

pdftk *.pdf cat output all-abstracts.pdf

I then append the Introductory material (from the core plmcn folder):

pdftk program-booklet/booklet.pdf abstracts/all-abstracts.pdf cat output full-book.pdf

which I burst into single pages again:

pdftk full-book.pdf burst output program-booklet/pages/

There in this directory, I have stampit v0°2, along with stamp.svg and pages.txt which is of this type:

pg_0003.pdf	 1 
pg_0004.pdf	 2 
pg_0005.pdf	 3 
pg_0006.pdf	 4 
pg_0007.pdf	 5 
pg_0008.pdf	 6 
pg_0009.pdf	 7 
pg_0010.pdf	 8 
pg_0011.pdf	 9 
pg_0012.pdf	10 
pg_0013.pdf	11 
pg_0014.pdf	12 
pg_0015.pdf	13  	
pg_0016.pdf	14
pg_0017.pdf	15		    
pg_0018.pdf	16   	S1 Invited   
pg_0019.pdf	17   	S1	    
pg_0020.pdf	18   	S1	    
pg_0021.pdf	19  	S1          
pg_0022.pdf	20   	S2 Invited  
pg_0023.pdf	21   	S2	    
pg_0024.pdf	22   	S2	    
pg_0025.pdf	23   	S2          
pg_0026.pdf	24   	S3 Invited  
pg_0027.pdf	25   	S3	    
pg_0028.pdf	26   	S3	    
pg_0029.pdf	27   	S3          
pg_0030.pdf	28   		    
pg_0031.pdf	29   	Keynote	    
pg_0032.pdf	30    	S4 Invited  
pg_0033.pdf	31    	S4	    

Then running stampit

./stampit

and reassembling (in "stamped" directory)

pdftk *.pdf cat output PLMCN24.pdf 

gives the final product!