pdf-generation

HTML footer at the last printed page

柔情痞子 提交于 2019-12-02 00:48:36
问题 I want to print my html page. I have more than 1 page and I want print my footer only at the bottom of the last page. My css @page { size: 8.5in 11.0in; margin-left: 0.7cm; margin-top: 0.7cm; margin-top: 0.7cm; margin-bottom: 2.6cm; margin-right: 0.5cm } #footer { clear: both; position: running(footer); z-index: 10; margin-top: -1em; vertical-align: bottom; height: 5%; } @page { @bottom-center { content: element(footer); } } HTML: <body><div id="content"></div> <div id="footer"></div> <body>

xsl:fo retrieve-marker not valid child

你。 提交于 2019-12-02 00:47:21
I need for my xsl:fo transformation an <fo:retrieve-marker> in an table but I don't know if this is possible because I use FOP Processor for my transformation. If i use the <fo:retrieve-marker> in my table I always get an error message that the tag has to be in an static content. Here is the table with the marker <xsl:call-template name="MMEL-Table-Header"/> <!-- Bottom table Line --> <fo:table-footer> <fo:table-row> <fo:table-cell> <fo:marker marker-class-name="footer-continued"> <fo:inline>(continued)</fo:inline></fo:marker> </fo:table-cell> </fo:table-row> </fo:table-footer> <fo:table-body

PDF generated with PDFBox is blank

我们两清 提交于 2019-12-02 00:23:05
I am trying to write content into a PDF file. I have written the code public ByteArrayOutputStream createPDF(String text) throws IOException, COSVisitorException { PDDocument document; PDPage page; PDFont font1; PDPageContentStream contentStream; ByteArrayOutputStream output = new ByteArrayOutputStream(); document = new PDDocument(); try { page = new PDPage(); document.addPage(page); contentStream = new PDPageContentStream(document, page); contentStream.beginText(); contentStream.moveTextPositionByAmount( 100, 700 ); contentStream.drawString("Hello World Hello World Hello World Hello World

Portuguese/Spanish accents with jsPDF

試著忘記壹切 提交于 2019-12-01 23:53:47
How can I manage to get special characters in a PDF file generated with jsPDF? The texts are dynamically loaded through AJAX. Some possible chars are à , É , Ç and õ . I, up to now, didn't get how to do this. Cesar You must download the last version of jsPDF, there will be a file called jspdf.plugin.standard_fonts_metrics.js, just reference that script from your html page and that would be more than enough to user special caracters would be a simple line like this: <script src="jspdf.plugin.standard_fonts_metrics.js"></script> <script> doc.text(74, 25, 'Evaluación de prueba'); </script> This

What PDF meta data does dompdf support?

狂风中的少年 提交于 2019-12-01 23:31:10
问题 When using dompdf what PDF meta data can be set in the document information dictionary? Originally asked elsewhere: Are you able to parse more META info to be added to PDF information during PDF generation? /Creator (DOMPDF) /CreationDate (D:20150818031116-05'00') /ModDate (D:20150818031116-05'00') Can you specify Author, Copyright, etc..? I cannot find ANY reference to this. Only just saw your: Creator, Creation Date and Modification Date! 回答1: In the current stable release (0.6.1) the HTML

English text extracted using itextpdf is not understandable

人盡茶涼 提交于 2019-12-01 22:36:28
I'm trying to extract and print english text out of a pdf on console. Extraction is done through itextpdf API using PdfTextExtractor class. Text i'm getting is not understandble. May be some language issues I'm facing. My intent is to find a particular text within a PDF and replace it with some other string. I started with parsing the file to find the string. Following code snippet represents my string extractor: Document document = new Document(); PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(OUTPUTFILE)); document.open(); PdfReader reader = new PdfReader(input); int

Exporting multiple pages to PDF in a specific order

依然范特西╮ 提交于 2019-12-01 22:14:50
I am trying to export pages from two different sheets of a workbook as 1 PDF. However, I want the pages to be in this order: 1 page from Sheet1, 5 pages from Sheet2, 2 pages from Sheet1. At the moment I am exporting these as 3 seperate PDFs and then merging them afterwards in another application. The code I have been using is below: ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, FileName:=sPath & quotept1filename, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, From:=1, To:=1, OpenAfterPublish:=False ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, FileName:

How to print a PDF created with iText?

和自甴很熟 提交于 2019-12-01 22:07:21
Hi I have created a PDF file with an image in it, I want to print my pdf after creating. Better if I have the PDF in memory instead of having a file, and then send it to the printer... Any Idea ? I am using iText. Check my code: import com.lowagie.text.Document; import com.lowagie.text.DocumentException; import com.lowagie.text.Image; import com.lowagie.text.PageSize; import com.lowagie.text.Rectangle; import com.lowagie.text.pdf.PdfContentByte; import com.lowagie.text.pdf.PdfPrinterGraphics2D; import com.lowagie.text.pdf.PdfTemplate; import com.lowagie.text.pdf.PdfWriter; import javax.imageio

Create a PDF From a JSP Output

泄露秘密 提交于 2019-12-01 21:24:12
I have a webpage with a export option to PDF. I have to display the contents of the page in the PDF. Currently I use iText PDF Library to generate PDFs. The problem is creating PDF with iText is quite a challenge. Moreover we get frequent layout/UI changes for the webpage, so we have make the same changes to PDF. Is there any way i can convert my JSP output to PDF. Like for example "if we set the content type to contentType="application/vnd.ms-excel", a JSP table can be rendered as Excel document. Have you checked Jasper Reports ? It has the concept of XML templates. Also same template can be

Why doesn't jasper report throw a JRFontNotFoundException if font for PDF is missing?

旧时模样 提交于 2019-12-01 20:18:28
问题 I read https://stackoverflow.com/a/4028080/5277820 https://stackoverflow.com/a/35549391/5277820 http://community.jaspersoft.com/questions/543275/fonts-problem-while-using-jasper-reports-402-version http://refermycode.com/remove-font-dependency-in-jasper-report/ and I expected that Jasper Reports throws a JRFontNotFoundException if a font is not installed on the machine. But my application doesn't throw a JRFontNotFoundException, although I have not installed the used font "Helvetica" on any