I have an html template which I need to render as a .PDF and then save that pdf file on server. I'm using "rendering" plugin of grails. I'm able to render file as PDF but I don't understand how to save it on server location and not on user's system. Can anybody please help me ?
Render HTML or GSP as a PDF and save it on server
3.7k Views Asked by Piyusha Jadhav At
2
There are 2 best solutions below
0
Piyusha Jadhav
On
Well, actually I changed my plugin. Got Wkhtmltopdf plugin of grails more helpful. you can find it here -- https://github.com/quorak/grails-wkhtmltopdf
Also instructions regarding using this plugin you can find on the same link or here --
[https://github.com/quorak/grails-wkhtmltopdf]
Using this you can get "bytes" which you can write to file system.
Related Questions in PDF
- Itext get special letters from pdf
- Carrierwave file upload with different file types
- Get text from a section of a pdf page with IcePdf
- itext pdf to image convert
- PDF to Text extractor in nodejs without OS dependencies
- PDF to ByteArray Conversion
- Opening PDF file in SWT Browser - XulRunner default viewer
- Generate TCPDF output to a shared drive folder
- Combine base and ggplot graphics in R figure window in different pages
- Updating a PDF Barcode Field in iOS and Android Device
- Prevent PDFsharp from saving an image file?
- Adding attachment links between lines in itext for pdf
- Crop Pdf from each edge using itextshap
- How to create a PDF with iText+XMLWorker from servlet using custom font?
- how to create a pdf editor for grails
Related Questions in GRAILS
- No such property: id for class: java.lang.String
- Using like to non-string columns in Grails
- How to convert object reference that are in string form to that refrence class object?
- Restrict access to java-melody monitoring url
- Intercepting springsecurity behavior in grails
- Sort a Grails Domain list using a column index instead of column name
- Using service beans and dependency Injection in Geb Functional Tests
- how to create a pdf editor for grails
- Remove method of the List is not working
- Grails query based on Date
- Unit tests fail to run after upgrade from grails 2.3 to 2.5
- GGTS Classpath won't recognize folder on classpath after gradle eclipse
- Grails 2.4.4. hierarchical domain structure: find
- change input field value via javascript in grails
- Create skinny War file using Maven in Mavenized Grails
Related Questions in PLUGINS
- How to specify SonarQube rule description as a markdown/html resource file instead of using annotation?
- JENKINS Maven Build Failure
- disable update for wordpress plugin named Dropbox Folder Share
- Fancytree: implementing bootstrap skin
- Send information to Maya node instance in cpp
- Which plugin is used to show the data in front end of socrata
- Reuse jquery plugin without conflict
- how can i use require(""); in javascript
- Phonegap VideoPlayer Plugin Sample Code
- How to resolve java.lang.StringIndexOutOfBoundsException: String index out of range: -325 while deploying Liferay Ext plugin 6.1
- Wordpress plugin: How to depend on other plugins?
- Notification.alert not working cordova version 4+
- FindBugs in Intellij - Possible to reuse .fbpref file?
- ACF Gallery thumbnails (image included)
- Cordova plugin development - adding aar
Related Questions in RENDERING
- SDL2 main game loop
- PdfBox issue while changing page
- OpenGL heightmap terrain render does not draw
- Characters arbitrarily being changed
- How to debug transforms in glsl vertex shaders in lwjgl
- How to make PyCollada output multiple meshes to the same scene?
- Pass parameters to rendering using ItemRendering in Sitecore
- Rendering a scene created in Blender with Babylon.js without the Babylon.js default shiny material
- Drupal 7: best way to render arbitrary content directly into <body> while keeping what's in <head>
- Android - active rendering in game loop?
- HTML How to get image to load with less quality
- Why is ListView rendering so slow for certain characters?
- CustomView's "onDraw()"-Method never gets called
- SDL - BlitSurface vs LowerBlit
- Rendering HTML Tags Laravel 5 Blade Templating
Related Questions in PDF-RENDERING
- Repair PDFium crashes for old Android versions or include own library
- How to change the orientation of the existing pages of the pdf report in the afterRender function in jsreport?
- PDF Rendering Issues in Github
- Render/Dispaly and Play youtube video embedded in pdf, Android
- Best practice for displaying multiple bitmaps in a scrollable list
- PdfRendering zoom on page
- Edit the source of a pdf file and it corrupts the pdf (could not be opened)
- Check if fonts are embedded in an existing PDF?
- Android open pdf in my app no externals APIs
- How to draw a PDF file with different font size?
- How to Customize PDF file content That open by using Action_View
- jsreport doesn't render text
- How to render whole pdf document using pdf.js library?
- Running NDK projects on Android
- Render a PDF file and save to object using grails Rendering and Attachmentable plugins
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
The pdfRenderingService provided by the plugin allows you to call render and get back an OutputStream. Using that output stream you can write that to a file on your server. The documentation explains the basics of using the service.
Your code may look something like this: