pdf-generation

Scale HTML proportionally to fit exactly to PDF A4 size

有些话、适合烂在心里 提交于 2019-12-30 00:17:34
问题 I am using PHP, Mysql, jQuery. I have a webpage that is to be converted into high-res A4 size PDF: http://optisolbusiness.com/funeral_site/sample/index/id/255. I have converted the HTML to PDF using wkhtmltopdf , which works great. Here is the generated PDF http://optisolbusiness.com/Guru/Gurupdf/optisol.pdf. But the HTML is not fitting exactly to PDF size; There are spaces around the HTML in PDF. How to scale HTML to fit A4 PDF size 100%? Importantly the content inside the html (ie) text

How to get a single PDF document from Doxygen?

旧城冷巷雨未停 提交于 2019-12-29 11:46:14
问题 When I generate Doxygen documentation in PDF format, I get plenty of different files with a single diagram in each. Is it possible to obtain a single PDF document, organized as a book, roughly as the HTML version? Is it possible to get it automatically, i.e. without dealing manually with the latex files? Thank's! 回答1: See Converting a LaTeX document to a PDF document. When Doxygen is finished processing, in the latex directory there's a file called 'refman.tex'. There are three ways you can

Generating large pdf without having content in main memory

血红的双手。 提交于 2019-12-29 09:27:10
问题 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;

Why is text truncated in PDF with Linux?

。_饼干妹妹 提交于 2019-12-29 08:50:12
问题 I try to format a Date in Jasper Reports and it works with Windows but not with Linux. With Linux the resulting text is truncated. Code: JRXML: <parameter name="timestamp" class="java.util.Date"/> [...] <textField> <reportElement x="0" y="0" width="50" height="16" uuid="0007846a-26f1-457a-a198-67a2f7c8417c"> <property name="local_mesure_unitwidth" value="pixel"/> <property name="com.jaspersoft.studio.unit.width" value="px"/> <property name="local_mesure_unitx" value="pixel"/> <property name=

How to export table displayed on jsp to pdf in java strust2

吃可爱长大的小学妹 提交于 2019-12-29 07:14:08
问题 This is my data display in table format. I want to show as it is in PDF without using display tag library of struts2. <table border="1" align="center" style="border-color: #CCCCCC; border-width: 1px; border-style: None; width: 1320px; border-collapse: collapse;" id="tablepaging"> <tbody> <tr> <td>Leave ID</td> <td>FROM DATE</td> <td>TO DATE</td> <td>DAYS REQUESTED</td> <td>APPROVER</td> <td>NOTES</td> <td>REMARK</td> <td>IS PLANNED</td> <td>REASON</td> </tr> <tr> <td>270</td> <td>12/27/12</td

VBA - IE Automation - save as PDF isn't working

好久不见. 提交于 2019-12-29 02:01:20
问题 I'm trying to automatically download PDFs from a website (job posting) thanks to a IE automation in VBA and for some reason I don't manage to generate a single PDF. Doing it manualy by going on the web page and doing a 'save target as' on the pdf icon works fine and gives me a valid PDF but the automation fails. I don't understand why and hope someone will be able to give me a hint. Thanks, VeeBee Please find hereafter the code I have so far (the URLs are public and I've picked up offers at

How to add Header and Footer in dynamic pdf using iTextLibrary?

送分小仙女□ 提交于 2019-12-28 18:42:10
问题 I have created a PDF file dynamically using iText Library, Now I want to add Header and Footer in PDF's pages, for this one I have added given code: document.addHeader("My Header Title", "My Header Details"); But in my PDF's pages this header couldn't set. What is issue that I don't know, If you have any idea related to it,please share your thoughts. 回答1: In case you use a current iText version (i.e. 5.4.x as of now) have a look at the sample MovieHistory2 from iText in Action — 2nd Edition

How to create pdf files on android [duplicate]

对着背影说爱祢 提交于 2019-12-28 18:14:32
问题 This question already has answers here : How to create PDFs in an Android app? [closed] (8 answers) Closed 6 years ago . Can't find any library to create pdf files on Android. Can any one help me? 回答1: There is a lot of pdf libraries for java (which you use when you program for android). Here are a few of them 来源: https://stackoverflow.com/questions/3521097/how-to-create-pdf-files-on-android

How to repair a PDF file and embed missing fonts

孤街醉人 提交于 2019-12-28 13:21:13
问题 I use pdftk to repair some failures in corrupted PDF files, but I faced another problem which is not fixed by pdftk (or at least I do not know how to do so). I have PDF files with text based on TrueType fonts, but the fonts have not been embedded during PDF creation. Now I want to embed the required fonts to the existing files. Is there a command-line tool (like pdftk ) to embed missing fonts by providing path to TTF files? 回答1: You can use Ghostscript to embed missing fonts. Run the command

PDF - Remove White Margins

百般思念 提交于 2019-12-28 02:50:08
问题 I would like to know a way to remove white margins from a PDF file. Just like Adobe Acrobat X Pro does. I understand it will not work with every PDF file. I would guess that the way to do it, is by getting the text margins, then cropping out of that margins. PyPdf is preferred. iText finds text margins based on this code: public void addMarginRectangle(String src, String dest) throws IOException, DocumentException { PdfReader reader = new PdfReader(src); PdfReaderContentParser parser = new