How to generate PDF offline with UWP - pdf

I'm developing a UWP app for tablet and i need to generate a PDF with data from SQLite. I need to do this completely offline because where I will use the app there is no connection. What could I do?
I'd prefer not to use paid libraries like Syncfusion and XFinium so I'm trying to find an alternative solution.
I tried with iTextSharp but unfortunately I can't find a good documentation to render a complex PDF or to export a Bitmap generated from a Grid Component to a PDF File.

Why not render your data into a webpage displayed with a WebView control? Then you can use any permissive licensed javascript library to generate the PDF.
If it hasn't changed much, then you can only send text back and forth between your WebView and UWP app, but that's workable. Your final PDF result can be read back as a base64 encoded string.
A very quick search found this one that seems easy to use and you can just download the source to put into your app:
https://github.com/MrRio/jsPDF

Related

Android camera, take picture(s) and save as multipage PDF, then upload to server via <input type="file" />

I have a webform with and want to open it on smartphone - than take pictures of some documents which need to be merged in one PDF, and on the end this file need to be uploaded to server.
My solution is to use Google Drive to upload PDF (scan) to GDrive and then somehow download this file from gdrive to server via some sort of widget (any links appreciate) installed on website.
Maybe someone have a better idea?
I know its late but my answer might help others. I also face the same challenge and implemented a custom solution based on Javascript and Since you are using web form so this solution will perfectly fits on your need.
You have to use JSPdf javascript library, JSPdf provide you pdf object in your browser and you can upload it download it and there are many other thing to play with.
First you have to initialize JSPdf object as per your requirement. I am creating PDF with page size width:500px and height 500px.
pdf = new jsPDF("l", "pt", [500,500]);
Simply when you will take picture from camera you will have each picture in form of base64, that base64 format you have to insert in JSPdf object
pdf.addImage(imgData, 'JPEG', 0, 0);
you can repeat the above code to add pictures from camera as much as you want, at the back-end these images are compiling and creating pdf document where each page have each images in sequence.
Once you are done, you can get PDF object in form of base64 object using below code that you can upload to any server.
pdf.output('datauristring')
above is only pdf part, you can find complete working example including camera part here Javascript Component to Scan Document

Creating React Native App with pdf annotation and sign on PDF Function

as I state on the title, I want to develop a project that having ability to open PDF file within the App (React Native), then later we can add annotation, notes, and sign on the PDF (put writing).
The pdf is from the server, so I assume we can call some kind of library that can open pdf and edit and have those features.
I tried browsing about it and found that PSPDFKit can be a solution, but the pricing is pretty much expensive. Is there any other library that can be use for this purpose?

sencha touch pdf generation form client side

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 json to pdf generation in sencha touch.
Regards
java has nothing to do with javascript.
A quick Google search of "javascript pdf generation" lists some libraries that may work but getting them to run on a device might be more trouble than its worth id look at submitting the form results to a server and downloading the resultant PDF.
this might point you in the right direction:
generating-pdf-files-with-javascript

QuickLook plugin displaying an image and some infos

I'm currently writing a QuickLook plugin, and I wondering how I can display an image and some information about that image at the same time, similar to http://www.code-line.com/software/sneakpeekphoto/ .
There is only one way to do so: Convert your content to an already supported one. This means either PDF or HTML. There are two options you have:
For static information you create a simple PDF preview by rendering a view into a PDF. (Use -dataWithPDFInsideRect: method of NSView)
For dynamic information create a HTML page with links and so on. QuickLook will then show it. (I think this is also the way your example does it.)
We have not found a way to create complex previews on ur own and had to stick to one of the methods, too. Keynote and Pages do the same -- they convert their presentations to multi-page PDF previews...

Search and Highlight text in PDF for IPad

I am working on the PDF App for iPad and facing an issue: how to search a text in PDF and also how to highlight that text?
Yours is the same big problem I'm having. My understanding is that, currently on iOS 4.0, the main public API is CGPDF . It allows us to parse PDF, and with it we can search strings in it. See also this Quartz 2D document. It also allows us to render it on the screen using CGContextDrawPage. However, it's not yet possible to get the position of a text in the rendered image. (On OS X it's possible using PDFKit.)
So, I'm afraid that you need to implement the PDF spec yourself to get that info. I think GoodReader etc. is working very very hard to implement these.
I had the same trouble recently and then I found FastPDFKit. Have tested the package and it's working great.
http://mobfarm.eu/fastpdfkit