pdf-generation

cannot open pdf file generated using dompdf

你离开我真会死。 提交于 2019-12-14 03:44:30
问题 i am trying to generate a pdf file from smarty template using dompdf:code is below:- require_once('dompdf/dompdf_config.inc.php'); $dompdf = new DOMPDF(); $dompdf->load_html($smarty->fetch(CURRENT_TEMPLATE.'/module/shopping_cart.html')); $dompdf->render(); $dompdf->stream("sample.pdf"); a pdf file is generated,but when i try to open the pdf file a error message is displaying as below "Acrobat cannot open the 'sample.pdf' because it is either not supported file type or because file has been

Add markers and hyperlinks for citations in pandoc

倾然丶 夕夏残阳落幕 提交于 2019-12-14 03:44:13
问题 I put references in a yaml metadata-header: references: - id: fenner2012a title: One-click science marketing author: - family: Fenner given: Martin ... (described here: http://johnmacfarlane.net/pandoc/README.html#extension-citations) and I can cite this reference with See [@fenner2012a]... . This will create an output in the pdf like this: See ("One-click science marketing")... with no hyperlink on the reference. Instead of the title I want to have auto-incremented number: See [1] with [1]

How to add iText into my netBeans project?

对着背影说爱祢 提交于 2019-12-14 03:17:23
问题 Im using Netbeans 8.0.2 and I am trying to give my output as a PDF file. On a quick google search, I learnt iText can help me do it. But how can i import iText package into my project? How should i import the package that i have downloaded (latest). 回答1: If your project uses Maven then you simply add iText to your pom.xml . <dependency> <groupId>com.itextpdf</groupId> <artifactId>itextpdf</artifactId> <version>5.5.8</version> </dependency> See http://developers.itextpdf.com/itext-java 回答2:

Adding TOC to PDFDocument in Swift/Cocoa using PDFOutline

时光总嘲笑我的痴心妄想 提交于 2019-12-14 03:06:15
问题 I'm working on a small routine that takes a number of single page PDFs and merges them together into one multi-page PDF. I'm working in Swift4/MacOS/Cocoa and can not for the life of me find any kind of example in Swift for creating an outline / only traversing an existing one (which I'm well familiar with). Using best guess on the documentation I came up with the following which I've been twiddling w/a bit but no luck at all. The PDF comes out fine but there is never an outline/TOC in it. It

Divide page in 2 parts so we can fill each with different source

喜你入骨 提交于 2019-12-14 02:24:48
问题 I need to create an User guide, where I've to put the content in 2 different language but on the same page. so the first half of the page would be in English while the second part would be in French. (In future they might ask for 3rd language also, but maximum 3). So each page would have 2 blocks. How can I achieve this using iTextPDF in java ? UPDATE Following is the structure for more insight of the question. 回答1: If I understand your question correctly, you need to create something like

Generating PDF from HTTPS causes error

大憨熊 提交于 2019-12-14 02:18:30
问题 I'm using Winnovative PDF Converter to generate PDF files from HTML (URL) When triggering a button on a HTTP web page, to generate a PDF from a HTTP URL, this works fine. However when triggering a button on a HTTPS web page, to generate a PDF from a HTTP URL, I get the error: Could not render the url. Could not get image from url.Navigation timeout.. Why is this happening and how can I prevent it? Please Note: I'm not getting an error when generating a PDF of a HTTPS page, I'm getting an

How to prevent table resizing in PDF using mPDF and PHP?

穿精又带淫゛_ 提交于 2019-12-14 02:17:10
问题 I have some form data and after submitting, a PDF is generated. The problem is size of tables in PDF. If some string in my form is too long the PDF is generated wrongly. It's because the tables. They have static size so if string is too long the table did not accommodate it. I use mPDF library. How can I make this tables size dynamics so as to their size changed depending on the length of string? If string {p} is longest then width of table the table size decrease. I want to if the string {p}

Converting docx to pdf using openxml and pdfcreator in c#

六眼飞鱼酱① 提交于 2019-12-14 00:27:45
问题 I need to convert docx to pdf file in server. I have seen PDFCreator will do, based on below link(http://sourceforge.net/projects/pdfcreator/). I need some suggestions on this as listed below: can i use PDF Creator in server side. without creating word object, can i convert docx to pdf with openxml by using pdfcreator API. Please give me reply soon. 回答1: You can use docx4j.NET to convert a docx to XSL FO, and from there, to PDF. Or, indeed, to any of the other output formats supported by

PDF report maven configuration with sonar-maven3-plugin 3.5.1 verstion

99封情书 提交于 2019-12-13 21:33:39
问题 I am using sonar-maven3-plugin 3.5.1 and i don't know how to configure PDF report for this plugin. Is sonar-maven3-plugin uses any internal plugin for report. I don't know how and where to configure the reporting plugin. 回答1: In Sonar 4.0+ the plugin is included with the base install. The PDF is generated automatically when you run mvn sonar:sonar , but the dashboard doesn't contain the PDF widget by default. Add it by going to Dashboards > Configure Widgets. Search for and add the PDF widget

iText Merge PDF with cropbox

假装没事ソ 提交于 2019-12-13 21:01:14
问题 Does any know how to merge two pdf (one of them have cropbox and the other don't have, and they have different page size) using iText? here is the code, that I use for PDF merge: public bool MergeFiles(string destinationFile, string[] sourceFiles) { bool bSucess = true; if (System.IO.File.Exists(destinationFile)) System.IO.File.Delete(destinationFile); string[] sSrcFile; sSrcFile = new string[2]; string[] arr = new string[2]; for (int i = 0; i <= sourceFiles.Length - 1; i++) { if (sourceFiles