Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added a test for .zip files.

  • Loading branch information...
commit 712d9b5b21275149d43347293c469dc7542b2339 1 parent f16aca5
@pdfcrowd authored
Showing with 12 additions and 11 deletions.
  1. +12 −11 test/client_test.js
  2. BIN  test/sample.html.zip
View
23 test/client_test.js
@@ -5,18 +5,19 @@ credentials = require('./config').Credentials;
myPdfcrowd = new pdf.Pdfcrowd(credentials.username,
credentials.apikey);
+var apiOptions = {
+ width: "11in",
+ height: "8.5in",
+ vmargin: ".4in",
+ footer_html: '<div style=text-align:center;font-size:smaller;color:maroon;">\
+ Page %p out of %n\
+ </div>'
+}
+
+myPdfcrowd.convertFile("sample.html.zip", pdf.saveToFile("zfile.pdf"), apiOptions);
myPdfcrowd.convertHtml("raw code", pdf.saveToFile("html.pdf"));
myPdfcrowd.convertURI("http://example.com", pdf.saveToFile("url.pdf"));
myPdfcrowd.convertFile("sample.html", pdf.saveToFile("file.pdf"));
-myPdfcrowd.convertHtml(
- 'footer example',
- pdf.saveToFile("footer.pdf"),
- {
- width: "11in",
- height: "8.5in",
- vmargin: ".4in",
- footer_html: '<div style=text-align:center;font-size:smaller;color:maroon;">\
- Page %p out of %n\
- </div>'
- });
+myPdfcrowd.convertHtml('footer example', pdf.saveToFile("footer.pdf"), apiOptions);
+
View
BIN  test/sample.html.zip
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.