| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
Added all of the parameter types specified in
https://ghostscript.com/doc/current/VectorDevices.htm for
PDF/Postscript devices.
Added several devices, updated documentation, and README.txt.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
New abstract classes Device and FileDevice and several subclasses
to allow easy modification and output to devices.
|
|
|
|
|
| |
Updated to the newest Ghostscript version and fixed an
ArrayIndexOutOfBoundsException bug when unloading zoomed pages.
|
| |
|
|
|
|
|
|
|
| |
Zooming is now done through the SmartLoader and is no longer
a separate operation. Fixed an issue when the SmartLoader could
become out of date due to the condition variable being signaled
before the SmartLoader had finished.
|
|
|
|
|
| |
Users now have the option to distill a document if the desired
input is not a PDF.
|
|
|
|
|
|
|
|
| |
Zooming in on documents in the viewer no longer causes a crash.
Fixed a bug where documents would not display after being loaded.
Fixed a bug where closing a document when none was loaded would
crash.
Fixed a bug where gsapi_delete_instance would cause a crash.
|
|
|
|
|
|
| |
Fixed JNI crashes when Ghostscript calls were made from different
threads. Migrated loading low res and high res images from using
multiple instances to using one global instance.
|
| |
|
| |
|
|
|
|
|
|
| |
Replaced all Reference objects in Ghostcript calls in Java
and JNI to Reference<T>. Iteration over parameters now must be
done through GSInstance instead of creating an explicit iterator.
|
|
|
|
|
| |
All GS functions are now able to be called through GSAPI. Fixed
a possible memory leak related to exception checking in C++.
|
|
|
|
|
|
| |
Got gsapi_enumerate_params working and added a utility class
to do the same work as gsapi_enumerate_params with a Java
iterator.
|
|
|
|
|
|
|
| |
Renamed java function to gsapi_set_param_once to distinguish from
the actual Ghostscript call. This method does the call to
gsapi_set_param twice in native code and is used to make it easier
to use the function in Java.
|
|
|
|
|
| |
Wrote out all native method signatures in Java and C++. Workekd
on gsapi_add_control_path and associated helper methods.
|
| |
|
|
|
|
| |
Added some of the new methods, but currently none work.
|
|
|
|
|
|
|
| |
An error would occasionally be thrown in the SmartLoader having to
do with the Document being modified while in the SmartLoader, causing
an error. Reconfigured how the SmartLoader handles documents and
is started and stopped.
|
|
|
|
|
|
|
|
| |
The viewer now ensures that no more than one ghostscript call is
happening at the same time and has multiple options for controlling
the behavior if multiple operations are attempting to be called.
Also began work on a utility class to make Ghostscript calls easier
by having a class carry around a instance and a caller handle.
|
|
|
|
|
| |
Added better exception handling. Began progress on handling
concurrent operations better.
|
|
|
|
|
| |
The high resolution image loads correctly, but the viewer does
not correctly load the right page when in a zoom other than 1x.
|
|
|
|
|
|
| |
Page loader now only loads around where the use is viewing and
does not load pages unless the user actually navigates to those
pages.
|
|
|
|
|
| |
Optimizations and easier user interface as well as basic zooming
implemented.
|
|
|
|
|
| |
Added utility methods in ViewerWindow.java to help with changing
pages and zoom levels. Added framework for zooming pages.
|
|
|
|
|
|
|
| |
Viewer now works and can open files. Still does not "smartly"
target pages which the use is directly viewing or take
advantage of file-specific properties. It instead loads all
the pages' high-resolution images in order.
|
|
|
|
|
| |
The viewer has basic capabilities, but still lacks loading
high resolution images, spacing components, and resizing correctly.
|
|
|
|
|
| |
Added GUI (generated using NetBeans). Added support for callbacks
into the GUI specifically related to the wanted viewer operations.
|
|
|
|
|
|
|
| |
Document class is a list of Pages which stores a low-resolution image
and a high-resolution image. The low-resolution image should always
be loaded while the high-resolution can be unloaded to save memory
usage.
|
|
|
|
|
|
|
| |
The original project should be compiled as a JAR library and
where needed, should be placed alongside the required native
libraries to run. The executable Java project has been moved
to the gsviewer project.
|
|
|
|
|
|
| |
Fixed drawing colors coming from ghostscript. Next: need to migrate
the current project into a jar file instead of a runnable application.
The viewer will use the Java library.
|
|
|
|
|
| |
Fixed Java methods not being found in C++ and added a window class
to start displaying images.
|
|
|
|
|
| |
onDisplayPage now uses a BytePointer object for the pimage parameter
to interface into native memory.
|
|
|
|
|
| |
Added NativePointer and NativeArray as two base classes for low-level
memory-access alongside other classes to assist with this.
|
|
|
|
|
|
| |
Fixed multiple points where the program could crash
and instead returned NULL and/or threw a (safer) Java
exception.
|
|
|
|
|
|
| |
The display_callback device did not have the correct values regarding its size,
major version, and minor version. Furthermore, the display_device structure
was not being dynamically allocated and ended up being freed too early.
|
|
|
|
|
| |
Fixed stdio bugs and added some more utility methods to make calling
ghostscript functions easier in Java.
|
|
|
|
|
| |
Added implementations for StdIO and display callback, and added
some testing in main().
|
|
|
|
|
| |
Finished writing JNI bindings and added more utility methods to
help with setting Reference objects in Java.
|
|
|
|
|
| |
Added support for more functions and finished implementing display
callback functions.
|
|
|
|
|
|
| |
Added utility methods in C++ code to help with calling functions,
setting fields, and creating objects. Started to implement the functions
defined in display_callback.
|
|
|
|
|
|
| |
Created a new C++ project which allows for Java calls into Ghostscript.
Current working functions are gsapi_revision, gsapi_new_instance, and gsapi_delete_instance.
gsapi_set_stdio_with_handle and gsapi_set_stdio are untested.
|
| |
|
|
|
|
|
|
|
| |
Started GSAPI class to store exported Ghostscript functions. Added error constants and declared
gsapi_revision, gsapi_new_instance, gsapi_delete_instance, gsapi_set_stdio_with_handle,
gsapi_set_stdio, gsapi_set_poll_with_handle, gsapi_set_poll, and gsapi_set_display_callback bindings.
Added multiple callback interfaces and a Java representation of struct display_callback_s.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Annotations are somewhat odd and don't quite fit the scheme of other
cos objects. Each annotation is created as a dictionary, which is
stored in the Annots array (also a cos object)) of the page.
But we write the annots out to the file immediately, and free the
dictionary contents at that time. We cannot, however, free the dict
cos object, because we need the object number to write the Annots
array in the page dictionary, which we only do when writing the page
dictionary.
So at the end of the page the annots array contains a number of empty
dictionaries. We free the array, which would free the dictionary
contents (except there are none) but it does *not* free the dictionaries
because they have an ID......
So when we free the Annots array, we first need to set the ID of each
of the dictionary objects it contains to 0, so that the dictionary
will also be freed.
|