pdf-generation

Converting Twitter bootstrap page into PDF with wkhtmltopdf : span issue

烈酒焚心 提交于 2019-11-30 11:51:22
问题 I am using Symfony2 Bundle KnpSnappyBundle to convert an html twig template to a pdf. KnpSnappyBundle is base on Snappy wrapper, that use wkhtmltopdf. My template use twitter bootstrap 2.3.2 css like this : <div class="container"> <div class="row"> <div class="span12"> <h4>TITLE</h4> </div> </div> <div class="row"> <div class="span6" id="customers"> <h5>TITLE</h5> <p>TEXT</p> <ul class="unstyled"> <li>LIST ITEM</li> <li>LIST ITEM</li> <li>LIST ITEM</li> <li>LIST ITEM</li> </ul> </div> <div

iOS - Creating multi page PDF from HTML content [closed]

跟風遠走 提交于 2019-11-30 11:09:48
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I have a long html page and wanted to convert it in to a multipage PDF file. I have followed the instructions provided in apple and here - how to make multi page PDF for a given string content. But the formatting

Silent Printing of PDF From Within Java

微笑、不失礼 提交于 2019-11-30 11:06:45
问题 We are looking into silent printing of PDF documents from within Java. The printing will be invoked from the desktop and not through a browser so we cannot use JavaScript. PDF Renderer is an operational solution but their rendering quality is not acceptable. iText does not seem to be pluggable with the Java print service. There are some commercial Java libraries, jPDFPrint by Qoppa, JPedal, and ICEpdf which we have not tried out yet. Does anybody have any experience with PDF silent printing

How to generate pdf file from dynamic data coming from mysql database in php?

我与影子孤独终老i 提交于 2019-11-30 10:31:31
I am doing one web application society management system. In this application I want to generate pdf file for each user separately. Means during invoice generation , if there are 10 users then for each user separate invoice should get generated as a pdf after clicking on generate PDF button. My invoice got generated for each user but now I dont understand how to convert it into pdf dynamically. So please help me in this question ? Use any of the following php scripts to generate dynamic PDF documents fpdf: http://www.fpdf.org/ tcpdf: http://www.tcpdf.org/ You probably have to check out this

Rails PDF Generation with Prawn in IE7

拟墨画扇 提交于 2019-11-30 10:31:28
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 following in my controller: def index params[:year] = default params[:year] params[:month] = default params

Itext pdf Merge : Document overflow outside pdf (Text truncated) page and not displaying

好久不见. 提交于 2019-11-30 10:01:45
问题 i am trying to merge 2 pdf in one. Merging is working fine but contents overflow from pdf page. A shown in attachment. Original Document pdf is as Follows. After Merge Document is coming like this Java code as follows : BaseFont bf = BaseFont.createFont(BaseFont.TIMES_BOLD, BaseFont.CP1252, BaseFont.EMBEDDED); //BaseFont bf= BaseFont.createFont(); PdfContentByte cb = writer.getDirectContent(); // Holds the PDF // data PdfImportedPage page; int currentPageNumber = 0; int pageOfCurrentReaderPDF

Using Sphinx docs how can I specify png image formats for HTML builds and pdf image formats for Latex/PDF builds?

时光总嘲笑我的痴心妄想 提交于 2019-11-30 09:29:55
Using sphinx doc generator, I am trying to use .png images for the HTML builds of the documentation, and then I want to have the .svg images used for the PDF/LATEx builds. Anyone know how to "tag" sections as "HTML build"-only and "Latex build"-only? Cheers Take a look at these options: Image filename wildcard: .. image:: gnu.* From the documentation : "For instance, if the file name gnu.* was given and two files gnu.pdf and gnu.png existed in the source tree, the LaTeX builder would choose the former, while the HTML builder would prefer the latter." The only directive: .. only:: latex This

Convert PDF to UIImage

梦想与她 提交于 2019-11-30 09:11:59
func drawOnPDF(path: String) { // Get existing Pdf reference let pdf = CGPDFDocumentCreateWithURL(NSURL(fileURLWithPath: path)) // Get page count of pdf, so we can loop through pages and draw them accordingly let pageCount = CGPDFDocumentGetNumberOfPages(pdf); // Write to file UIGraphicsBeginPDFContextToFile(path, CGRectZero, nil) // Write to data // var data = NSMutableData() // UIGraphicsBeginPDFContextToData(data, CGRectZero, nil) for index in 1...pageCount { let page = CGPDFDocumentGetPage(pdf, index) let pageFrame = CGPDFPageGetBoxRect(page, kCGPDFMediaBox) UIGraphicsBeginPDFPageWithInfo

problem in drawing a line in a pdf file using itextsharp

爱⌒轻易说出口 提交于 2019-11-30 08:51:21
I am generating a pdf file in asp.net c# using itextsharp. i am not able to draw a horizontal line/verticle line/dotted line. i tried to draw a line using the following code,i am getting no errors but the line is also not getting displayed in the pdf file PdfContentByte cb = wri.DirectContent; cb.SetLineWidth(2.0f); // Make a bit thicker than 1.0 default cb.MoveTo(20, pdfDocument.Top - 40f); cb.LineTo(400, pdfDocument.Top - 40f); cb.Stroke(); What is the problem in the code.Is it because of the position of x y co-ordinates? I had used rough points to know approximate position in pdf,but the

A multiline(paragraph) footer and header in reportlab

感情迁移 提交于 2019-11-30 08:24:16
What is a best way to have a footer and header in reportlab, that not just a single line, that can be drawed with canvas.drawString in onPage function. Didn`t find a way to put something like Paragraph into header/footer in onPage function. What is the best way to handle this? Is there a way to put a paragraph into footer ? You can use arbitrary drawing commands in the onPage function, so you can just draw a paragraph (see section 5.3 in the reportlab user guide ) from your function. Here is a complete example: from reportlab.lib.pagesizes import letter from reportlab.lib.styles import