pdf-generation

Is there a way to generate a preview of PDF in IE

假如想象 提交于 2019-12-08 12:59:50
问题 Is there anyway at all to generate a preview of a PDF in an IE browser? I know that you could use an iframe in either Chrome or Firefox, and a blob in IE, but they both require their own code, I'm looking for something that will work cross browsers. 回答1: Finally found a solution, that generates an in-browser preview window for a PDF file that is supported by all browsers! Here's my code (I've put in an input box so that anyone could test any PDF URL): <div class="wizard-content"> <div class=

Convert webpage from HTML to PDF?

蓝咒 提交于 2019-12-08 12:51:34
I have a website with the following structure: Tab Container - having 4 Tab panels Each tab panels is having 4 gridviews which are separated by line break. Now when i am in a particular tab, I want to use an 'export to pdf' button , which should generate a pdf having 4 gridviews visible in this tabpanel. Same for all other tabpanels. I have searched enough, found may articles telling about using itextsharp, wkhtmltopdf, pdf generators etc, however I dont seems to find fully implemented functionality anywhere. Can anyone guide/suggest anything ? I always use wkhtmltopdf to convert a html page

How can I add text to a Checkbox I create using iTextSharp?

一曲冷凌霜 提交于 2019-12-08 12:38:45
问题 Derived from Jeff S's methodology found here, I can add a "Checkbox" to a PDF page like so: PdfPTable tblFirstRow = new PdfPTable(5); tblFirstRow.SpacingBefore = 4f; tblFirstRow.HorizontalAlignment = Element.ALIGN_LEFT; . . . // code where textboxes are added has been elided for brevity PdfPCell cell204Submitted = new PdfPCell() { CellEvent = new DynamicCheckbox("checkbox204Submitted", "204 Submitted or on file") }; tblFirstRow.AddCell(cell204Submitted); doc.Add(tblFirstRow); The

Outputting PDF with Django as attachment and reload

ε祈祈猫儿з 提交于 2019-12-08 11:22:28
I´m using django to generate a pdf and return the response as an attachment in the view. response = HttpResponse(mimetype='application/pdf') response['Content-Disposition'] = 'attachment; filename=somefilename.pdf' Similar to the way described in the doc (http://docs.djangoproject.com/en/dev/howto/outputting-pdf/#write-your-view ) What is the best way to reload the page? This didn´t work out (the form triggers the pdf generation): $('#the_form').submit(function(){ location.reload(); }); Thanks a lot, Danny Don't reload. Instead create a view which is the target of the form. The view generates

iTextSharp: Setting text on textfield that is on a table cell results in text being too wide and squashed

浪尽此生 提交于 2019-12-08 10:58:20
问题 I think this might be a bug, but if anyone can help I'd appreciate it. I currently have another question open that deals with a similar issue, but I think this question better exemplifies the problem, and more simply too. That being said I don't want to delete the old one in case it increases my wait time. I yield to the mods to decide which question is better. Here's a sample application that creates a pdf, then a table. It adds a cell to the table and then ties a fieldpositioningevent to

Create pdf using cocoa?

旧城冷巷雨未停 提交于 2019-12-08 09:14:16
问题 There is some tutorial about how to create a pdf using cocoa? I can't find anything. I looked for it on the web and it seems that I need Quartz to do it, but there aren't practical examples. Can you help me? Thank you in advance. —Albé 回答1: See Cocoa Printing Architecture documentation. Basically, any printing operation creates a PDF and, in general, the best way to create PDF documents is to implement custom printing layouts. Alternatively, NSView has printing related methods for grabbing

One cell with different border types

只愿长相守 提交于 2019-12-08 09:12:53
问题 When I try to create a dotted cell I am using the PdfPCellEvent as described in example. However I get all of the borders drawn with dotted line. When I set up the cell.setBorder(Rectangle.BOTTOM | Rectangle.RIGHT); the bottom and right got drawn with solid line. When I remove the setBorder I got all borders dotted. Questions: How to draw a cell with three types of borders solid, dotted and NO_BORDER . I am after an exemplary simple table from the picture. Where the blue lines stands for NO

Can JasperReports include a pdf in a report?

隐身守侯 提交于 2019-12-08 08:17:50
问题 Is it possible to include an existing pdf file in a JasperReport? We really want to append new data to an existing report with out regenerating the existing report. We will be exporting back to pdf. I'm looking at using iText's PdfCopy to merge two pdfs, but was hoping JasperReports might have an easier way... 回答1: I don't think you could do that in JasperReports, but it would be fairly simple in iText. Generate the JasperReport, and then use PdfCopy to append the new report to the original

How to add fonts using tFPDF

自作多情 提交于 2019-12-08 07:40:36
问题 I try to create pdf file using tFPDF with custom font. I put arial font inside font/unifont folder. I use this code to create pdf file: $pdf->AddFont('arialbd','','arialbd.ttf',true); $pdf->SetFont('arialbd','',16); $pdf->Cell(40,6, 'OÜ Kersti Võlu Koolituskeskus', 0, 1); $pdf->SetFont('arialbd','',10); $pdf->Cell(40,12,'REGISTREERIMISLEHT', 0, 1); $pdf->Output('test.pdf', 'I'); It works well on localhost, but when I uploaded this file on server, it shows me an error: Warning: fopen(C:\xampp

How to generate Crystal Report in PDF format while passing Multiple Parameters?

我的未来我决定 提交于 2019-12-08 07:37:18
问题 I want to generate crystal report in pdf format. I had done the same thing by passing one parameter. But this time I want to pass 10 parameter. I followed the same thing what I did for passing one parameter. But now I got the Error Message "Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack." Anyone please give suggestions. Thanks in advance. Please modify my Code according to generate Crystal Report in PDF format. In the Button Click