pdf-generation

IIS configuration: Navigation to the webpage was canceled when converting page to PDF using SautinSoft.PdfVision

☆樱花仙子☆ 提交于 2019-12-24 09:11:59
问题 I am having a problem when trying to convert an ASP .Net page to PDF using SautinSoft.PdfVision. Using this library is quite straight forward, all you need to do is tho provide the URL of the page you want to convert and the PDF destination path. SautinSoft.PdfVision v = new SautinSoft.PdfVision(); v.ConvertHtmlFileToPDFFile(url, pdfFilePath); Instead of having the page I ask for to be rendered as PDF, I always get the one saying "Navigation to the webpage was canceled", as if IIS (version 7

How to hide text in an PDF file?

有些话、适合烂在心里 提交于 2019-12-24 07:16:54
问题 How can I add text to a pdf document, which is not visible? The document manipulation should be done in java. The usecase is to add further metadata to a document (in a proprietary format, about 40kb), before the document is signed and archived. I tried: annotation field with size 0,0 .txt file attachment but, this annoys readers of the PDF, because they see a difference (comment / attachment bar). Is there a comment object or a syntax to comment out lines in a PDF document? EDIT: I've tried

iOS Add links while creating PDF

痴心易碎 提交于 2019-12-24 07:08:32
问题 I am creating a PDF using UIGraphicsBeginPDFContextToFile in iOS, where I want to add URL links to other pages as well as other websites. Below is the code : here pdfObj is a custom class which draws text to PDF. After Succesfull creation of PDF nothing happens if I clicks the area for "GO to Chapter1" and "GO to URL" UIGraphicsBeginPDFContextToFile(documentDirectoryFilename, CGRectZero, nil); UIGraphicsBeginPDFPage(); //Page 1 UIGraphicsAddPDFContextDestinationAtPoint(@"Chapter1",

PDF scaling/importing pages that have been trimmed/cropped

徘徊边缘 提交于 2019-12-24 06:57:06
问题 I am currently in the process of writing an app that "formats" PDF's to our requirements, using iText 2.1.7. We basically take a portrait PDF, and scale down the pages, so we can fit 2 pages of the original PDF, on one landscape page of the new PDF. We also leave some space at the bottom of the page which is used for post processing. This process works 90% of the time as it should. However, we received a PDF that has been cropped/trimmed by the content department, and when we view this PDF in

sencha touch pdf generation form client side

随声附和 提交于 2019-12-24 06:51:21
问题 We are working on creating mobile app using sencha touch frame work. one of our requirements is when user hits view pdf, the user entered form details which stored locally has json format should be rendered and view as pdf and also it can be saved as a pdf locally. i found that itext is one of the java library which is widely used for pdf generation. but i couldn't find any article inter relating both sencha touch and itext. let me know is that a possible way or any other method available for

é becomes &195;#169 and then becomes é How do I fix this encoding issue?

Deadly 提交于 2019-12-24 05:34:18
问题 I have a java file in Eclipse that is in UTF-8 and has some strings containing accents. In the java file itself, the accent is written and saved as é . In the xml that is generated using velocity the é becomes é In the pdf that is generated using fop and and an xsl template, the output is displayed as é So this is probably an encoding issue and everything should be in UTF-8. What's weird is that locally in my eclipse environment (windows) where I run the application, the whole process works

é becomes &195;#169 and then becomes é How do I fix this encoding issue?

青春壹個敷衍的年華 提交于 2019-12-24 05:33:25
问题 I have a java file in Eclipse that is in UTF-8 and has some strings containing accents. In the java file itself, the accent is written and saved as é . In the xml that is generated using velocity the é becomes é In the pdf that is generated using fop and and an xsl template, the output is displayed as é So this is probably an encoding issue and everything should be in UTF-8. What's weird is that locally in my eclipse environment (windows) where I run the application, the whole process works

PhantomJS - Rendering fails to show all images

这一生的挚爱 提交于 2019-12-24 05:24:11
问题 I have a phantomjs script that is stepping through the pages of my site. For each page, I use page = new WebPage() and then page.close() after finishing with the page. (This is a simplified description of the process, and I'm using PhantomJS version 1.9.7.) While on each page, I use page.renderBase64('PNG') one or more times, and add the results to an array. When I'm all done, I build a new page and cycle through the array of images, adding each to the page using <img src="data:image/png

Spacing/Leading PdfPCell's elements

孤者浪人 提交于 2019-12-24 04:23:15
问题 Is it possible to add space between the elements of a cell (rows) in C#? I'm creating a pdf in visual studio 2012 and wanted to set some space between the rows. I have something like this: PdfPTable cellTable = new PdfPTable(1); PdfPCell cell= new PdfPCell(); for(i=0; i < 5; i++) { var titleChunk = new Chunk(tittle[i], body); var descriptionChunk = new Chunk(" " description[i], body2); var phrase = new Phrase(titleChunk); phrase.Add(descriptionChunk); cell.AddElement(phrase); } cellTable

Semi-transparent (translucent) background color ignored in jasper reports pdf export

╄→гoц情女王★ 提交于 2019-12-24 03:54:14
问题 Q: Why is the alpha information lost when saving to PDF? Jaspersoft studio doesn't allow me to specify colors with alpha. So I tried to be clever and specified keys on my shading elements and changed the color in the code like so: JasperReport jasperReport = (JasperReport) JRLoader.loadObject(getClass().getResourceAsStream("/reports/Test.jasper")); ((JRStaticText) jasperReport.getGroups()[0].getGroupHeaderSection().getBands()[0].getElementByKey("bg")).setBackcolor(new Color(0, 0, 0, 30)); (