I'm using Wicked PDF to generate a PDF from HTML. I've seen this SO question on adding metadata to a PDF, and it suggests using XMP metadata. How can I use Wicked PDF to add XMP metadata to a generated PDF?
If you are creating the original document using Prawn as you say, then just use the info attribute to set the meta-data you need. See the manual and search for :info. I'm not sure what you mean when you say Wicked PDF adds a title. PDF documents don't have titles (although sections and subsections can in the outline). See this discussion, for example.
If you can't add metadata directly with WickedPDF, you might try using another library to add the metadata after the PDF is generated (a two step process).
I found an SO answer that suggests PDFtk might be able to do that: https://stackoverflow.com/a/18536830/473691.
Related
I have been working on creating Epub for my work. I have used Aspose to create the Epub. In this process numerous word document is merged together and single epub file is created. Now I am asked to create an EPub based on a template. I have been searching a way to do it but I am no where near to the solution. I haven't even found the template for Epub which will render smoothly over various devices IOS and android. Similarly I have no clue how I will achieve this task programmatically. If anyone out there have any idea please provide me an insight.
As you may know an ePub is a file that contains a lot of html pages. if you want to create a template based epub programmatically you should link this files to a css and modify the structure of the html as the template.
If I were you I would use a regex to edit the html files, get the contents and place this contents in a new html page. Once done that I would place the html page in the epub.
I suggest you please create the template document (DOTX) using MS Word. Import this template document into Aspose.Words' DOM, merge Word documents, do other document processing tasks, and save it to EPUB using Document.Save method. You may also create the template document programmatically using Aspose.Words. I work with Aspose as Developer evangelist.
I need to generate report to pdf file, save on the server, than send the file to the client by email.
I am looking to a gem for exporting pdf file
And I want to know if the file keep all the pdf options (like links and the option to select text copy text etc')
Thanks
You can use wicked_pdf gem to generate PDF from HTML. You can configure the options whatever you want in their advanced usage.
Wicked PDF is what you need. It will export to PDF and keep all links, text and images as a real PDF would, because it generates a real, full fledge PDF.
I need a user to be able edit a pdf template in rails such that a user can customise logo, email signatures, price etc.
I thought prawn looked like a good option but I read that it should now only be used to generate a pdf from scratch.
Any help, suggestions, pointers to tutorials would be really helpful.
Thank you.
The pdf-forms gem can fill out existing pdf files. This has worked well for me for inserting text into a template PDF.
pdftk supports adding images to an existing pdf via multistamp, which is effectively merging two pdfs together (on top of each other). To add an image to an existing pdf, you could use something like prawn to create a pdf with your image, then use pdftk with multistamp to merge that with your filled out pdf:
pdftk filled_out.pdf multistamp logo.pdf output out.pdf
pdf-forms is a thin wrapper on top of pdftk, so it should allow you to pass the multistamp params required. If not, you can add that functionality or shell out to pdftk directly.
Adobe Acrobat Pro is useful for defining your template fields visually in an existing pdf.
I am not sure but try your luck with Wicked pdf.
I am working on Symfony-1.1 in an existing project. How can I read pdf files and extract text from them?
It's not a Symfony 1.1 related question, actually. It's a PHP one. There several libraries to handle PDFs in PHP. Following are some suggestions.
https://github.com/smalot/pdfparser
http://pastebin.com/dvwySU1a
http://www.pdflib.com/
If you just need to parse pdf in anyway and then process the text in PHP, you can also consider using a java library like the following.
http://pdfbox.apache.org/ (Is there a PDF parser for PHP?)
I am a newbie in iPhone development. I am planning to do a PDF application for iPhone. The functionality is:
User will type their input in a text field (which is going to be the content of the PDF file).
I have to modify the PDF file through code while saving (paragraphs, tables, bullets etc).
User can save it in their own name.
User can send the PDF file as attachment of MFMailComposer.
So I have searched and got many links. However I didn't find any leading details to create and modify a PDF file in iPhone/iPad.
Can anyone please provide me a good reference to do this. Are there any alternatives to do this?
I've used this reference: https://developer.apple.com/library/ios/#documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_pdf/dq_pdf.html
It contains theoretical explanations and source code examples
Please use the below link to download sample apps for PDF Reader/Viewer in iOS
PDF Reader/Viewer in iOS
Also please look at detail about pdf creation, manipulation etc in below links
developer.apple: PDF Document Creation, Viewing, and Transforming
Fast-and-lean-pdf-viewer-for-iphone
If you were doing a Phonegap app I'd say got for jsPDF, which would enable you to create (basic) PDF files in Javascript. I don't do Obj-C, but a quick look on SO provides good links.