i'm trying to generate pdf of google map, which is generated by gm4r plugin using wicked_pdf, unfortunately map is not genereted in the pdf.
Need some help on this
rails v= 2.3.5
hai my problem using solved using static gmap gem . now i can able to generate the pdf of the map. thank
Related
I am brand new to pdf generation or rendering. I am working on a application to replace iText and create kind of a RESTful endpoints using any Java related PDF APIs.
The library should be able to convert images and.., others to PDF.
Read/fill the data from PDF programmatically and also merge.
Also, if we can host it ourselves that would be the best choice.
Could you please provide some insight into this?
Not exactly a "Java related PDF API" but since you want to go REST anyway:
We use a headless Chrome in a docker container for generating PDFs. A good starting point is hc-pdf-server. We use it as an internal service using REST.
Note that this way, documents need to be designed using HTML and CSS. Also, you need to use a template engine in order to insert contents into your documents. We use Mustache. It is simple and does the job.
I could not find any reference for PdfGraphics2D class in itext7. Please let me know how to migrate to latest itext7. We are using itext 2.1.5 currently doing a POC to migrate to itext7.
We are using itext to render graph in PDF document in our application. The PDF document itself generated using other library not using itext.
You can export a JFreeChart object to a BufferedImage.
See JFreeChart & Image
BufferedImage objBufferedImage=objJFreechart.createBufferedImage(600,800);
Once you have a BufferedImage, you can render it to PNG (again, see linked post), and tell iText to insert the PNG image.
It is possible to use OrsonPDF to create the PDF from JFreeChart, then add that to your iText PDF document. I wrote a blog post describing how to do this a while back:
https://jfree.github.io/orsonpdf/
I am using Drupal 8 and working on Eform types. I had to generate PDF from eform submissions. I used entity print module for this and am using DOMPDF as PDF Engine. I am able to apply custom css to the pdf but the requirements are still not covered. Now I need to override the template so that I can customize the PDF as per my requirement, I could not achieve this. Few requirements:
I need to insert tabular format.
Custom sequence of entities/fields.
Site Logo
Is there any way to do so?
You could also go to he link to get more details on the output before it is sent to the pdf engine.
/print/pdf/node/86/debug
Anybody knows an example tutorial, how to upload multiple files (unlimited quantity) with paperclip & Rails 3.1? All examples I've seen are uploading fixed files count per one upload.
I am also looking for it. I found this page:
https://github.com/blueimp/jQuery-File-Upload/
There is a demo over there. It is not based on paperclip, it seems, but then I also found this one:
https://github.com/tors/jquery-fileupload-rails
Which has a linked repository with an example with paperclip:
https://github.com/tors/jquery-fileupload-rails-paperclip-example
Maybe this one can get us in the right direction!
Good luck!
I'm working with Rails 3.0.9 and Ruby 1.9.2. I am running the gem Paperclip to upload images, and this works fine.
However, I'm trying to integrate it with an API that returns just an image URL.
The plan is to run a cron job to fetch the XML output of the API, parse it, and store it in the database.
My question is, how can I use just the remote url to display the image in my application? I do not want to have to download all the images, as there are 1000s of images (only 1 per record though).
Can anyone suggest how to do this? Thanks in advance.
Sure in the latest version of paperclip (you might have to link it to the unreleased version in github). (Version > 3.1.3)
You can do something like this
self.your_paperclip_attachment_attribute = URI.parse("http://some.com/url/withimage.png")
That will download and link the attachment to your model.