epublib | it 's a clone of https : //github | Media library
kandi X-RAY | epublib Summary
kandi X-RAY | epublib Summary
it's a clone of i add some epub3 support.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Write the Spine
- Finds the resource with the given resource id
- Writes all Spine references
- Returns the number of bytes from the stream
- Reads the bytes from the underlying stream
- Reads a single byte
- Simple test test
- Set the cover image for the resource
- Write the cover html file
- Write all SpineReferences
- Called when a navigation event has been clicked
- Writes the cover tag
- Initializes the page
- Adds a resource to the book
- Move the current position
- Processes the raw stream
- Set the current resource index
- Adds an Identifier
- Gets all resources that have a given media type
- Returns all resources matching a list of media types
- Gets all descendant elements of a parent element with a given namespace and tag name
- Returns a String representation of the BOM
- Moves to the current page
- Replies all resources that are reachable by the Spine
- Writes the bindings in the book
- Process a HTTP stream
epublib Key Features
epublib Examples and Code Snippets
Community Discussions
Trending Discussions on epublib
QUESTION
I'm developing a web service in App Engine standard environment with Java (servlets). The idea is that it get info. from Cloud SQL and generate a EPUB programmatically with Siegmann' epub library: http://www.siegmann.nl/epublib
But i'm not sure that how can add things like images or html files (i first will convert the info. from Cloud SQL to HTML), sicen the writer of epub needs a path to a files.
can i download first all resources that need in local directory of app engine and references them? Or what can i do?
Thank you in advance and sorry for my English.
...ANSWER
Answered 2020-Jul-13 at 14:45Option 1:
You can use the /tmp
directory of your App Engine instance to store temporary files. See this link.
Bear in mind that files stored in the /tmp
folder will only be accessible within the instance that wrote them.
Option 2:
After a quick look to Siegmann' epub library, I have seen that resources can be provided as Byte arrays and the writer fills an OutputStream.
With this in mind, you could use Cloud Storage and it's Java Client Library to download and store the files.
In this Java sample from the docs, you can see that an object is up laded without the need of it being stored in file-system, just passing it as Byte array.
And to download files from Cloud Storage into the memory of your App Engine App, you could use storage.get(BlobId.of(bucketName, objectName)).getContent()
to get the object's byte array
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install epublib
You can use epublib like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the epublib component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page