pdf-generation

Exporting Google Sheet as PDF with Custom Headers or Footers in Google Apps Script

与世无争的帅哥 提交于 2019-12-03 03:28:39
I'm wondering how to add custom headers or footers to a PDF that is exported using Google Apps Script from a Google Sheet. I would like to add a footer that says "My Company Proprietary and Confidential" in the center of the page. This is functionality that is available in normal PDF export from Sheets (i.e. File » Download as » PDF » Headers & footers » EDIT CUSTOM FIELDS), but I don't know how to replicate it with URL parameters. I've also tried setting '&sheetnames=true&printtitle=true' , but this puts the sheet name and spreadsheet name in the header instead of the footer. Are there any

Any good PDF export filter that works with Fast Report?

老子叫甜甜 提交于 2019-12-03 03:28:25
I recently discovered that the PDFs exported by the Fast Report's PDF export filter aren't displayed correctly in Mac OSX, iOS and Android devices. Fast Report informed that their pdf implementation only support Windows and they can't say when the new implementation that they are working on will be available. I also tried to use the Gnostice export filter, but their demo installer didn't work in Delphi XE and when I contacted them, they took 15 days to send me some attached dcus which also didn't work. So I'm searching for another option. If you know or use a PDF export filter which works with

Building table dynamically with PDFMake

Deadly 提交于 2019-12-03 03:10:36
I'm working with pdfmake to generate pdf with javascript. I'm trying to build a table dynamically but not works ,this my attempt $.ajax({ type: "POST", url: myURL, success:function(data){ /* data has a format like : *[{"peaje":"Peaje 1","ruta":"Ruta 1","fechaCruce":"2014-10-18","hora":"15:42","valor":"5000"},{"peaje":"Peaje 1","ruta":"Ruta 1","fechaCruce":"2014-10-18","hora":"14:21","valor":"7000"},{"peaje":"Peaje 1","ruta":"Ruta 1","fechaCruce":"2014-09-19","hora":"11:58","valor":"17000"}] */ var peajes = JSON.parse( data ); var body = []; var titulos = new Array( 'PEAJE', 'RUTA', 'FECHA

iText: PdfTable cell vertical alignment

删除回忆录丶 提交于 2019-12-03 03:06:27
I'm trying to vertical align my headet cell text to be in the middle of the cell height. This is my code: PdfPCell c1 = new PdfPCell(cerate_phrase("" ,regular_bold )); c1.setHorizontalAlignment(Element.ALIGN_CENTER); c1.setVerticalAlignment(Element.ALIGN_MIDDLE); c1.setBackgroundColor(BaseColor.LIGHT_GRAY); table_.addCell(c1); but this does not work. setHorizontalAlignment is centered but not setVerticalAlignment . Am I doing something wrong? how can i vertically align it in the middle? Any help will be appreciated. According to Lowagie: PdfPCell cell = new PdfPCell(new Phrase("blah Blah blah"

Lock PDF against editing using iTextSharp

一曲冷凌霜 提交于 2019-12-03 03:06:02
I've created a C# program using iTextSharp for reading a PDF, appending social DRM content and then saving the file. How do I lock this new PDF against further editing? I want the user to be able to view the file without entering a password and I don't mind select/copy operations but I do mind the ability to remove the social DRM. Encrypt your PDF document. Simple HTTP Handler working example to get you started: <%@ WebHandler Language="C#" Class="lockPdf" %> using System; using System.Web; using iTextSharp.text; using iTextSharp.text.pdf; public class lockPdf : IHttpHandler { public void

pdfmake API? Is there a list of styles, fonts, capabilities?

て烟熏妆下的殇ゞ 提交于 2019-12-03 02:43:51
I'm using pdfmake. I want to format a document and they have good examples on github and in their playground but I was wondering if they featured all capabilities therein. I get the feeling that their may be additional properties like switching fonts, adding different style elements or underlining - things not expressly shared in the examples. Maybe what you see is what you get and that is all but I went over the github page pretty throughly and did not find a more detailed list of capabilities. It seems hella similar to html but it doesn't seem to have the same styling capabilities of html

line break problem with MultiCell in FPDF

泪湿孤枕 提交于 2019-12-03 02:01:08
I am using java port of fpdf. I am encountering fowwlowing errors. 1).When i call multicell 2 times every time the text is printed on a new line. MultiCell(0, 1, "abcd", currentBorders, Alignment.LEFT, false); //prints on one line MultiCell(0, 1, "efg", currentBorders, Alignment.LEFT, false); //prints on next line I want that there is no line break after the call to multicell. How can i do it? 2)If i do the following thing then some part of my string gets printed on one line and some on next. MultiCell(getStringWidth(myString), 1, myStringcurrentBorders, Alignment.LEFT, false); 3)If i do the

How to programmatically convert SVG to PDF on Windows?

你。 提交于 2019-12-03 01:30:35
I'm looking to programmatically convert SVG to PDF documents on a server. What are my options for doing that on Windows? I've seen links to Inkscape , Batik , and svg2pdf , but I'm not sure if these can easily be automated to perform the conversion on a Windows server. There's an unusual solution here which involves automating OpenOffice Portable on the server: http://www.codeproject.com/KB/office/PortableOpenOffice.aspx There are two options: Batik (Java, open source) Inkscape (native binary, open source) Batik will give you more control. With Inkscape, you can use the command line parameters

Phantomjs doesn't render footers with a custom styles

久未见 提交于 2019-12-03 01:26:38
I have the following example: var page = require('webpage').create(), system = require('system'); if (system.args.length < 3) { console.log('Usage: printheaderfooter.js URL filename'); phantom.exit(1); } else { var address = system.args[1]; var output = system.args[2]; page.viewportSize = { width: 600, height: 600 }; page.paperSize = { format: 'A4', margin: "1cm" footer: { height: "1cm", contents: phantom.callback(function(pageNum, numPages) { if (pageNum == numPages) { return ""; } return "<h1 class='footer_style'>Footer" + pageNum + " / " + numPages + "</h1>"; }) } }; page.open(address,

Error running wkhtmltopdf — (error while loading shared libraries)

爱⌒轻易说出口 提交于 2019-12-03 00:54:37
When my app runs (or when I run from commandline) the wkhtmltopdf command I get the following error: (showing it from command line) #> wkhtmltopdf wkhtmltopdf: error while loading shared libraries: libXrender.so.1: cannot open shared object file: No such file or directory I noticed the lib is indeed in the /usr/lib folder but not the /lib folder. Does it matter which one of these it is in? Is there any way to get it to recognize it? #> ls -l /usr/lib/libXrender.so* lrwxrwxrwx 1 root root 19 Feb 17 07:20 /usr/lib/libXrender.so -> libXrender.so.1.3.0 lrwxrwxrwx 1 root root 19 Feb 17 07:20 /usr