Including pdf-editing functionality in my Rails application - ruby-on-rails

Rails 7
One of the requirements for my application, is to have the user fill out some tax information, using a fillable PDF form. While there are some gems that allow me to create a PDF, I only saw one recommendation:
Rails-Pdf Editing Template
But the post is 7+ years old, and when I checked the pdf-form gem, it seems the last time anyone did work on it, was about 7 years ago.
I don't necessarily want to create my own solution, and I would be happy to crate a frame, within my app, that takes the user to another site where they can edit the PDF, as long as it could be saved back to my own server.
Any recommendations?

You can use HexaPDF to do this. It supports filling out AcroForm forms, if you wanna do it this. Or you can load the PDF and overlay the information yourself, using everything that is available in the Canvas class.
(N.b. I'm the author of HexaPDF and the library is dual-licensed under the AGPL and a commercial license.)

Related

Xcode PDFKit form automatic calculation

This may not be possible, but after searching for quite a while I thought I would ask the question to either point me in the right direction or confirm it's not possible!
I have iOS app (Xcode swift) that displays pdf documents using PDFKit
I have several PDF forms created in acrobat that have simply calculations which update automatically as numbers are entered or checkboxes ticked i.e. adding numbers together, totalling the number of checkboxes ticked.
Whilst each form has only simply calculations, each has a different number of input fields.
Is it possible in PDFKit (or another method) to display these PDF forms in an iOS app and have them perform the calculations without having to re-write in Xcode the calculation per form, i.e. basically make use of the embedded javascript that is part of the PDF form?
At present, when I display the form, while I can edit the the editable textfields, the calculation doesn't occur.
Appreciate any help
I've discussed this at WWDC 2017 when Apple introduced PDFKit for iOS.
Their answer is that JavaScript is not a feature that they are planning to support. This is consistent with the level of support in Apple Preview on macOS and also Safari on iOS/macOS - none.
3rd-party PDF SDKs often also include JavaScript implementations. The spec is quite complex, so it's unlikely that you find a product implementing all of the 894 pages (including things like the Japanese Emperor calendar).
PSPDFKit supports the common JavaScript API necessary for most forms to validate correctly. An easy way to check if your forms are supported is trying it in PDF Viewer (free, ad-free app for iOS and Android)

PDF4NET pdf's not showing the bound content when viewed on iOS default pdf reader

I am using Version 4.4.1.0 of O2S.Components.PDF4NET
I am using this in an MVC project to run through a series of 6 views and fill an object with the data required for the PDF.
When the PDF is bound and emailed in the last step it works great. all except for when it is viewed by default PDF reader on iOS devices.
My company purchased this product on the cheaper plan so the 90 support is over and I cannot access any sort of forums from there site.
I read a similar issue regarding a button not being displayed on iOS but there was no resolution other then to email the company.
I hope that there is a viable solution as I would prefer not to have to cut my losses and change to a different product over something as short sighted as not supporting/testing against one of the more common platforms people use to consume media.
I'm not sure what you mean by 'bound content' but I assume you are talking about form fields.
Forms fields and annotations are not displayed by the CGPDF API in iOS, only the main page content is displayed. It is not a limitation of PDF4NET, it is a limitation of the iOS PDF display engine. The workaround is to flatten the form fields thus making them part of the page content.
If this is not your situation, please send a mail to support and they will help you.
Disclaimer: I work for the company that develops PDF4NET.

How to edit PDF Forms in iOS application?

i have a lots of PDFs forms and i want to put them on iPad and fill them up, then send it by mail. how can i edit this pdf forms in an app? i am very new with xCode and i could use lots of suggestions ...
How can I edit PDF files in an iOS application?
i found this question durring my search and the idea presented here,
"A better idea in my opinion is to create a native UI showing the data contained in the PDF file using the standard Cocoa-Touch UIKit, and create the PDF once the user is done with it so that the user can export it back. That way, you don't have to write a complicated PDF handling code." .. sounds very good just that i dont know how to start ...
Thanks
Basically, what it's saying is create a nib/screen/front end to the PDF that would allow the user to record what data they want in there, then after that run a separate piece of code to write that data into the PDF!
Some links to help you out:
Quartz-2D Programming Guide (QuartzCore Framework): https://developer.apple.com/library/ios/documentation/graphicsimaging/conceptual/drawingwithquartz2d/dq_pdf/dq_pdf.html
A tutorial (Although aimed at iOS5)
http://www.raywenderlich.com/6581/how-to-create-a-pdf-with-quartz-2d-in-ios-5-tutorial-part-1
I will say, I can find information on GENERATING PDF files a lot easier/more reliably than editing them... Are the templates you have difficult? It may be worth re-creating them programatically when the data is inputted!

Let end users edit a pdf in rails?

I'm trying to find a way to let the client of a website I'm working on (specifically an administrator) edit the content of a pdf file. For example, if the client decides that they want to change the wording on a pdf (but not the format), they can click a button or something and make the changes they need to without asking me to do it. Any help would be much appreciated. :)
Check out The Ruby Toolbox page for report generation, specifically PDF_generation. There's a couple of different options with reviews and documentation.
https://www.ruby-toolbox.com/categories/pdf_generation

Is it possible to edit .ePub file via iPad application?

Requirement of the iPad app is to display an ebook that allows user to edit and save it. Further requirements are like navigation and bookmarks. In precise, just similar to the iBooks app.
My question is, is it possible to edit the .epub file? I believe we can edit .pdf files (As I have seen some apps available on iTunes). I tried searching on google, all I could find out is, how to display ePub file and how to customize the look of ePub file. Any suggestion would be great.
Have a look at
Sigil
Since it's open source, you may be able to tweak it to run on IOS.
Wikipedia's list of ePub editing systems doesn't have an IOS entry yet.
There is an app for editing ePub files, but it's a bit pricey at the moment ($14.99 as of this writing):
Easy ePub Creator Pro (link is to the App Store)
There is also a method that uses GoodReader, but requires several steps to take an ePub file and get it into GoodReader, editable, and then reverse the process after editing. But GoodReader is cheaper than the above option, and many iPad users already have it for other purposes, so I felt it's worth mentioning. The following blog post covers it.
Editing ePub files entirely on the iPad (blog post at "The Bergen Street Paper Co.")
Also, Kurt's answer points out that Wikipedia's list of ePub editors doesn't contain an iOS version, but it's worth noting that there are several entries in that list that run on the web. You might be able to edit your book in Mobile Safari on your iPad. I haven't tried, but it may be worth investigating.

Resources