Skip to content

Commit

Permalink
added url, date, time and page number on pdf snapshot footer
Browse files Browse the repository at this point in the history
  • Loading branch information
Orbiter committed Dec 16, 2014
1 parent 8b5d074 commit 7287dd7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/net/yacy/cora/util/Html2Image.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import javax.swing.text.html.HTMLEditorKit;
import javax.swing.text.html.ImageView;

import net.yacy.cora.date.GenericFormatter;
import net.yacy.document.ImageParser;
import net.yacy.kelondro.util.FileUtils;
import net.yacy.kelondro.util.OS;
Expand All @@ -44,6 +45,7 @@
import java.beans.PropertyChangeListener;
import java.io.File;
import java.io.IOException;
import java.util.Date;
import java.util.List;

public class Html2Image {
Expand Down Expand Up @@ -95,11 +97,12 @@ public static boolean writeWkhtmltopdf(String url, String proxy, String userAgen
private static boolean writeWkhtmltopdfInternal(final String url, final String proxy, final File destination, final String userAgent, final String acceptLanguage, final boolean ignoreErrors) {
final File wkhtmltopdf = wkhtmltopdfMac.exists() ? wkhtmltopdfMac : wkhtmltopdfDebian;
String commandline =
wkhtmltopdf.getAbsolutePath() + " -q --title " + url + " " +
wkhtmltopdf.getAbsolutePath() + " -q --title '" + url + "' " +
//acceptLanguage == null ? "" : "--custom-header 'Accept-Language' '" + acceptLanguage + "' " +
(userAgent == null ? "" : "--custom-header 'User-Agent' '" + userAgent + "' --custom-header-propagation ") +
(proxy == null ? "" : "--proxy " + proxy + " ") +
(ignoreErrors ? (OS.isMacArchitecture ? "--load-error-handling ignore " : "--ignore-load-errors ") : "") +
"--footer-font-name 'Courier' --footer-font-size 9 --footer-left [webpage] --footer-right [date]/[time]([page]) " +
url + " " + destination.getAbsolutePath();
try {
List<String> message;
Expand Down

0 comments on commit 7287dd7

Please sign in to comment.