pdf-generation

Converting Twitter bootstrap page into PDF with wkhtmltopdf : span issue

拟墨画扇 提交于 2019-11-30 02:00:13
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 class="span6" id="estimate"> <h5>TITLE</h5> <ul class="unstyled"> <li>LIST ITEM</li> <li>LIST ITEM</li>

Silent Printing of PDF From Within Java

可紊 提交于 2019-11-30 00:00:17
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 from Java? Apache PDFBox . It is currently in incubation, but the PDF printing functionality has been

Manual Page Break in TCPDF

ぃ、小莉子 提交于 2019-11-29 23:40:49
I am using TCPDF to generate the PDF in one of my projects. I simply create a HTML file and give it to the TCPDF to handle the PDF generation. But now I have some HTML where multiple certificates are added one after the other and I want to have a page break in it. Page Break should be decided by HTML i.e. I want to know if there is any identifier in HTML which TCPDF understands and then accordingly adds a page break into the generated PDF. How could I do this? AmdY I'm using <br pagebreak="true"/> . Find method writeHTML and code if ($dom[$key]['tag'] AND isset($dom[$key]['attribute'][

How to set a background color of a Table Cell using iText?

匆匆过客 提交于 2019-11-29 23:25:44
While it is of course possible to use BaseColor , by default, it offers very limited choices. I wonder how can i add my own custom color to the document? ... PdfPTable table = new PdfPTable(3); PdfPCell cell = new PdfPCell(new Phrase("some clever text")); cell.setBackgroundColor(BaseColor.GREEN); table.addCell(cell); ... Lots of options. BaseColor color = new BaseColor(red, green, blue); // or red, green, blue, alpha CYMKColor cmyk = new CMYKColor(cyan, yellow, magenta, black); // no alpha GrayColor gray = new GrayColor(someFloatBetweenZeroAndOneInclusive); // no alpha There's also pattern

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

两盒软妹~` 提交于 2019-11-29 23:21:37
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 the NSString ( with some like data ) is difficult than creating a html page. I have created this html and displaying it in a UIWebView. Now I want to create a PDF out of this HTML to a Multi page PDF file. The code I'm using can create single PDF. - (void)createPDFfromUIView:(UIWebView *)aView saveToDocumentsWithFileName:(NSString*)aFilename { // Creates a mutable data object for

PHP create PDF invoice

廉价感情. 提交于 2019-11-29 22:59:05
Hi does anyone know how I can create a nicely formatted PDF invoice through PHP? Ideally I'm looking for something with a header and then an itemised listing of the products with some sort of table around. After a quick Google I would be comfortable with generating a PDF but to try and style it nicely would be another thing altogether. Thanks I use TCPDF (see http://www.tcpdf.org/ ) for this: its pretty capable and not too painful to get setup. I will say that depending on your data source you may have some issues. In my case my data is sourced from a SOAP interface to my accounting system and

Why doesnt Acrobat Distiller embed all fonts fully?

霸气de小男生 提交于 2019-11-29 22:47:29
问题 When I use Acrobat Distiller (v.9.1.3), it seems that I cannot embed all fonts -- at least not in the way I want to (no subsetting). One example is Wingdings (TrueType). I activated the tickboxes and settings to "Always embed" and "No subsetting" . If I check in a text editor the *.joboptions file that I saved as my custom Distiller profile it clearly says: /EmbedAllFonts true /EmbedOpenType true /MaxSubsetPct 1 /SubsetFonts false Some fonts Distiller does embed fully (as requested by me),

How to get a snapshot of UITableView in a PDF format

纵然是瞬间 提交于 2019-11-29 22:41:29
I have a UITableView which is populated with some data but since it contains data that is more cells than the viewable area of the screen, I only managed to get only the snapshot of it, I want to know if there is any other way I can get the whole tableview snapshot in pdf..this is what I have tried thanks - (IBAction)clickMe:(id)sender { UIView *viewToRender = self.myTableView; CGPoint contentOffset = self.myTableView.contentOffset; UIGraphicsBeginImageContext(viewToRender.bounds.size); CGContextRef ctx = UIGraphicsGetCurrentContext(); // KEY: need to translate the context down to the current

PDFSharp: Measuring height of long text with word wrap

﹥>﹥吖頭↗ 提交于 2019-11-29 22:13:15
问题 PDFSharp supports automatic text wrapping when drawing long text portions: textFormatter.DrawString(text, font, XBrushes.Black, new XRect(x, y, textAreaWidth, 1000), XStringFormats.TopLeft); This will wrap the text if it is longer than textAreaWidth . How can I get the height of the text that has just been drawn? I tried it with gfx.MeasureString() , but there is no overload that supports specifying a maximal width. gfx.MeasureString() returns the size of the text without text wrapping.

dompdf Page break if element is exceeding page height?

心已入冬 提交于 2019-11-29 21:20:22
What is the best way to do page breaks in dompdf? I have had a look here at the page-break-before css attribute, but it didn't work when I did: table {page-break-before:auto;} The page still breaks in the middle of my table. Is it possible to setup my html/css so that the page will break before the element if the element is going to exceed the page height? Ideally I would like to divide my html up in to div sections so that each section will start on a new page if it is going to exceed the height of the current page. BrianS Using page-break-inside: auto; basically says to dompdf "do what you