samples/javascript/js.rb in origami-1.2.5 vs samples/javascript/js.rb in origami-1.2.6
- old
+ new
@@ -21,15 +21,15 @@
:EmbeddedName => "README.txt",
:Filter => :ASCIIHexDecode
)
# Example of JS payload
- js = <<-JS
+ pdf.onDocumentOpen Action::JavaScript <<-JS
if ( app.viewerVersion == 8 )
eval("this.exportDataObject({cName:'README.txt', nLaunch:2});");
this.closeDoc();
JS
- pdf.onDocumentOpen Action::JavaScript.new(js)
+
# Tweaking the engine options
pdf.js_engine.options[:log_method_calls] = true
pdf.js_engine.options[:viewerVersion] = 8