pdf-generation

How do I convert a PDF file to HTML in PHP?

瘦欲@ 提交于 2019-11-29 16:43:21
How do I convert a PDF file to HTML in PHP? Is there any lib or web service? I mean free, thanks! Google pdf2html, pdftohtml looks to be the only viable one. and it's based on a command line program, not PHP. so it may not be useful to you. Google is capable of converting, so there may be a way to do it with GDocs as well. though I'm not sure of that. At any rate, I hope this gets you on the proper path at least. Norbs Knight I've tried Poppler's pdftohtml command to convert PDF files to HTML files. Check it out on The HTML file output of Poppler is lighter when used but the output is not very

Generating large pdf without having content in main memory

和自甴很熟 提交于 2019-11-29 16:39:06
I am using iText to generate very large tables in pdf format. What is the best way to generate these tables instead of having the entire content in memory? If I just increase the below size in the for loop to a million I run out of memory, is there a better way to stream it than having the entire content in memory I saw this post How to directly stream large content to PDF with minimal memory footprint? But I want to know what iText api to use. Example Code: import java.io.FileOutputStream; import java.io.IOException; import java.util.Date; import com.itextpdf.text.Document; import com

Google Spreadsheet to pdf with watermark in Google script

早过忘川 提交于 2019-11-29 16:38:53
I want to convert the spreadsheet with a watermark/background image, and send + save the generated pdf The converting to pdf worked, but I don't know if/how you can put an image to the generated pdf. This is what i got now: function ExportAndSent(subject, filename, email) { var ss = SpreadsheetApp.getActiveSpreadsheet(); var message = "A message"; var tempSpreadsheet = SpreadsheetApp.create(filename); var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); sheet = ss.getActiveSheet(); sheet.copyTo(tempSpreadsheet); tempSpreadsheet.deleteActiveSheet(); var pdf = DriveApp.getFileById

convert windows form to pdf file

邮差的信 提交于 2019-11-29 16:19:57
how could i convert windows form into pdf(pdf document) format with same design as on form I tested this and it works. I don't like the fact that it creates a temp file. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Drawing.Imaging; using System.Drawing.Printing; using System.IO; namespace WindowsFormsApplication4 { public partial class Form1 : Form { private System.IO.Stream streamToPrint; string streamType; [System.Runtime.InteropServices

Add print area content (appending) at the end of initial existed pdf file in a new page section

孤街醉人 提交于 2019-11-29 16:07:35
For generating a report, I have create pdf with bellow approach. ActiveSheet.ExportAsFixedFormat _ Type:=xlTypePDF, _ fileName:=ThisWorkbook.path & "\rep.pdf", _ Quality:=xlQualityStandard, _ IncludeDocProperties:=True, _ IgnorePrintAreas:=False, _ OpenAfterPublish:=False In the ActiveSheet, there were specified Print Area, Witch contains a Table, so table's column filtered value have change programmatically, and need: I want new face of the print area that reforms by changing filtering criteria; get appends at the end of initial pdf file quietly, without creating a new pdf file, in a new page

PDF.js Inserting Images

末鹿安然 提交于 2019-11-29 15:53:24
I've started using PDF.js , an excelent work, by the way. But now I want to insert an image (from a canvas element) on the pdf page. Here's my code: var image = myCanvas.getContext('2d').getImageData(0,0,400,300), doc = new pdf(); doc.setProperties({ title: fileName, author: 'VirtuaLab®', creator: 'pdf.js' }); doc.addPage(); data = doc.output(); But I haven't found anything about inserting images on PDF.js pages. Maybe doc.image() or doc.addImage ? Disclaimer: I work for Bytescout Unfortunately PDF.js not working with images and that is why we developed PDF Generator SDK for Javascript (free

Rails PDF Generation with Prawn in IE7

跟風遠走 提交于 2019-11-29 15:43:53
问题 I'm using Prawn and Prawnto to generate a PDF in a Ruby on Rails app (Rails version 2.2.2) which works great and generates PDFs happily and sends them to the user to download in Firefox. The problem is in IE7. I have a route set up like so: map.invoice_pdf '/invoices.pdf', :controller => 'invoices', :action => 'index', :format => 'pdf' Which I then have a link like so to call: invoice_pdf_path(:year => params[:year], :month => params[:month], :unpaid_only => params[:unpaid_only]) And the

What is the FileType number for PDF in Excel 2007 that is needed to save a file as PDF through the API?

老子叫甜甜 提交于 2019-11-29 15:33:44
I need to call a function in order to save an Excel workbook. I installed the PDF save addon for Excel 2007 but now I need to know what the number code is for the file format for when I save the excel file. An example of the excel file format numbers can be found here. http://www.dailydoseofexcel.com/archives/2006/10/29/saveas-in-excel-2007/ FileExtStr = ".xlsb": FileFormatNum = 50 FileExtStr = ".xlsx": FileFormatNum = 51 FileExtStr = ".xlsm": FileFormatNum = 52 FileExtStr = ".xls": FileFormatNum = 56 FileExtStr = ".csv": FileFormatNum = 6 FileExtStr = ".txt": FileFormatNum = -4158 FileExtStr

Grails rendering plugin css issue

旧城冷巷雨未停 提交于 2019-11-29 15:27:21
I've just installed grails rendering plugin and would like to use it for generating PDF files. I've created simple template, but it is exported without any css styles. If I simply render template from grails, then page appears with all styles in my web browser. So, my question is - how to correctly include CSS file during PDF generation process? My template: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <link rel="stylesheet" href="${resource(dir:'css',file:'main.css')}" /> <link rel="stylesheet" href="${resource(dir

iText 5 header and footer

好久不见. 提交于 2019-11-29 14:53:58
how I can add in my PDF page the header and the footer ? I wanna a table with 3 column in header and other table, 3 column in the footer. My page could be A3 or A4, and landscape or portrait. Can anyone help me? I can not found on internet good examples. Thanks! Tommaso Create a class MyPageEventListener that extends PdfPageEventHelper Add a page event listener to the PdfWriter object In the onEndPage method of MyPageEventListener class, put the code for header/footer Example: public class MyPageEventListener extends PdfPageEventHelper { . . . @Override public void onEndPage(PdfWriter writer,