swftools-common
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swftools-common] Page number output using one file per page


From: Douglas Miller
Subject: [Swftools-common] Page number output using one file per page
Date: Fri, 14 Nov 2008 11:34:33 -0600

While digging through your source, I noticed that it is possible to generate one_file_per_page by putting a % in the output file name. I found this very useful and was wondering why you don't output the filename page number in sync with the pdf page number.

If I run the command: pdf2swf -p 1-3 -o output%.swf mypdf.pdf then pdf2swf will create 3 files: output1.swf, output2.swf, and output3.swf

If I run the command: pdf2swf -p 3-5 -o output%.swf mypdf.pdf then pdf2swf will create the same 3 files: output1.swf, output2.swf, and output3.swf

This is all fine and dandy until I have a 200 page pdf that I need to run through pdf2swf in batches due to the 65535 shape limit. This means that I have to run pages 1-20 first, then 21-40, and so on. The problem is that when I run the second page range (21-40) the output files start coming out as output1.swf instead of output 21.swf.

I managed to remedy this problem by changing the original source in pdf2swc.c from CVS at line 828: sprintf(buf, outputname, one_file_per_page++);  to: sprintf(buf, outputname, pagenr);

This seems to have solved the problem nicely. I just wanted to let you know about it in case this was something you wanted to include in the CVS version.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]