Set pdf2swf target Flash version to 7 to support Adobe AIR
When generating swf files for later versions of Flash pdf2swf will insert an unsupported command "allowDomain" into the generated swf files.
This commit is contained in:
parent
6bab3adf61
commit
dcb7e19651
@ -33,9 +33,11 @@ public class Pdf2SwfPageConverter implements PageConverter {
|
||||
public boolean convert(File presentation, File output, int page) {
|
||||
String source = presentation.getAbsolutePath();
|
||||
String dest = output.getAbsolutePath();
|
||||
String AVM2SWF = "-T9";
|
||||
/* Using flash taget version 7 to support Adobe AIR. Otherwise pdf2swf will /
|
||||
/ insert an unsupported command "allowDomain" into the generated swf files */
|
||||
String flashVersion = "-T7";
|
||||
|
||||
String COMMAND = SWFTOOLS_DIR + File.separator + "pdf2swf " + AVM2SWF + " -F " + fontsDir + " -p " + page + " " + source + " -o " + dest;
|
||||
String COMMAND = SWFTOOLS_DIR + File.separator + "pdf2swf " + flashVersion + " -F " + fontsDir + " -p " + page + " " + source + " -o " + dest;
|
||||
log.debug("Executing: " + COMMAND);
|
||||
|
||||
boolean done = new ExternalProcessExecutor().exec(COMMAND, 60000);
|
||||
@ -44,7 +46,7 @@ public class Pdf2SwfPageConverter implements PageConverter {
|
||||
if (done && destFile.exists()) {
|
||||
return true;
|
||||
} else {
|
||||
COMMAND = SWFTOOLS_DIR + File.separator + "pdf2swf " + AVM2SWF + " -s poly2bitmap -F " + fontsDir + " -p " + page + " " + source + " -o " + dest;
|
||||
COMMAND = SWFTOOLS_DIR + File.separator + "pdf2swf " + flashVersion + " -s poly2bitmap -F " + fontsDir + " -p " + page + " " + source + " -o " + dest;
|
||||
log.debug("Converting graphics to bitmaps");
|
||||
log.debug("Executing: " + COMMAND);
|
||||
done = new ExternalProcessExecutor().exec(COMMAND, 60000);
|
||||
|
Loading…
Reference in New Issue
Block a user