pdf-generation

iOS get error by creating a pdf

瘦欲@ 提交于 2019-12-04 21:19:56
i want to create a pdf file, but i get 2 errors: <Error>: CGDataConsumerCreateWithFilename: failed to open `/test.pdf' for writing: Operation not permitted. deflateEnd: error -3: (null). and this one <Error>: CGPDFContextCreate: failed to create PDF context delegate. I compute the path in the controller class - (void)viewDidLoad { documentName = @"test.pdf"; NSArray *arrayPaths = NSSearchPathForDirectoriesInDomains( NSDocumentDirectory, NSUserDomainMask, YES); NSString *path = [arrayPaths objectAtIndex:0]; NSString* pdfFileName = [path stringByAppendingPathComponent:documentName]; url = [NSURL

MigraDoc C# Align left and right on same line

Deadly 提交于 2019-12-04 20:54:35
问题 I have a table with a cell where i want two texts, the first, aligned on left and the second aligned on the right, in the same cell, on the same line. I tried to reproduce this cell with MigraDoc without success. I only can add two texts aligned on left and right but not on same line. Here my code: Cell cellFooter1 = rowFooter.Cells[0]; Paragraph paraphTot = new Paragraph(); paraphTot.Format.Alignment = ParagraphAlignment.Left; paraphTot.AddText("Left text"); cellFooter1.Add(paraphTot);

Issues in generating PDF from uiwebview in objective c

心不动则不痛 提交于 2019-12-04 20:53:34
I have open pdf file in uiwebview, add image and text in uiwebview subview.Then i tried created pdf file. Below sample i have used to generate pdf file. Multiple page writing in single page. How can i write sample quality and exact size. Please check screen shots and below source UIGraphicsBeginPDFContextToData( pdfData, CGRectZero, nil ); for (int i = 0; i < 10; i++) { CGRect f = [pdfView frame]; [pdfView setFrame: f]; UIGraphicsBeginPDFPage(); CGContextRef currentContext = UIGraphicsGetCurrentContext(); CGContextTranslateCTM(currentContext, 72, 72); // Translate for 1" margins [[[pdfView

Converting docx to pdf using openxml and pdfcreator in c#

眉间皱痕 提交于 2019-12-04 20:09:34
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. 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 Apache FOP. See this sample . docx4j.NET is an IKVM'd DLL of docx4j, an ASL v2 licensed open source project.

Chrome: How to print PDF with original size (100%, no scaling/shrinking)

柔情痞子 提交于 2019-12-04 18:24:41
问题 Today I encountered one weird bug in Chrome's printing behavior. When I try to print a dynamically created PDF using Chrome ( also in Firefox ), every image inside the PDF gets a little bit smaller (8mm). This doesn't happen neither in Adobe Reader/Acrobat/MacOSX Default Printer Dialog. Let me explain more about my code so far: dynamic PDF: I use prawn to dynamically create a PDF A4 (landscape format) using this code: require 'prawn' require "prawn/measurement_extensions" class CustomPdf <

Howto open a link in a pdf-file in a new window?

こ雲淡風輕ζ 提交于 2019-12-04 17:26:39
I have a link in a pdf-document (PDF1), which is embedded in a browser instance. Or let's say the Adobe Reader is embedded in a browser window. In this pdf-document (PDF2) is a link to a servlet, which view opens another pdf-file. Now the new pdf-document is opened in a embedded Adobe Reader in the same browser window. How can this document (PDF2) be opened in a new browser window with a new embedded Adobe Reader? Does this depend on the editor tool used for the generation of the pdf-document? PS: I am not creating the first one (PDF1), but I am faced with the question, how to open the second

how to read or extract graphical componenets such as square ,rect,line etc., from a pdf document using java?

十年热恋 提交于 2019-12-04 16:54:27
I am trying to extract all datas( such as square ,rect,line etc.,) from a pdf document which was generated using iText.But I'm not able extract the content rather than text and image.I want to extract graphical components mentioned above. npinti There seem to be 3 options for this (at least those are the ones I could find), I do not know what you exactly have, so I will paste all the 3, these are in increasing levels of difficulty) First Option: You could do something like so: (taken from here) PDDocument document = null; document = PDDocument.load(inFile); List pages = document

Azure and Rotativa PDF print for ASP.NET MVC3

爱⌒轻易说出口 提交于 2019-12-04 16:06:54
I'm using the Rotativa PDF print for an ASP.NET MVC application to generate a pdf from html content. This works great when running the MVC application by itself on an standard IIS; the pdf is generated almost instantly. But when MVC application is deployed as a web role in Azure (both locally on a dev environment and on cloudapp.net), generating the pdf print takes up to 45 seconds, and also seems have trouble displaying content ressources (the links are broken). Some thing seems wrong, it shouldn't take that long. The pdf generation itself is done using the wkhtmltopdf tool, which converts

How can I create a customized version of an existing pdf file with node.js?

混江龙づ霸主 提交于 2019-12-04 16:03:46
问题 I have an old system that was written in PHP a long time ago that I would like to update to node.js to allow me to share code with a more modern system. Unfortunately, one of the main features of the PHP system is a tool that allows it to load an existing PDF file (which happens to be a government form), fill out the user's information, and provide a PDF to the browser that has all of that information present. I have considered making a PHP script that will just do the PDF customization and

Wicked_pdf working fine in development, but not in production

ぐ巨炮叔叔 提交于 2019-12-04 15:47:22
I've been working with wicked_pdf to generate some PDFs in Rails, and it's been working fine in my dev environment, but I get a 500 error (but no specific errors in my log) when I try and generate one on my production environment. The first thing I noticed was that the wkhtmltopdf binary was in a different location on my production box, so I've added the following to my wicked_pdf.rb initializer: if Rails.env == "production" WickedPdf.config = { :exe_path => '/usr/bin/wkhtmltopdf' } end Here's how I'm calling it in my controller: def certificate @inspection = Inspection.find(params[:id])