summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Added several devices, updated documentation, and README.txt.evrhel-testevrhel2020-09-241-0/+77
|
* Worked on PDFPostscriptDeviceFamily implementationEthan Vrhel2020-09-247-9/+556
| | | | | | | | 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.
* Added missing Settings class to viewerevrhel2020-09-241-0/+241
|
* Added missing Settings class to viewerevrhel2020-09-241-0/+142
|
* Added more implementations of Device classevrhel2020-09-2410-16/+238
|
* Added device classes to allow easy device manipulationevrhel2020-09-2415-1/+571
| | | | | New abstract classes Device and FileDevice and several subclasses to allow easy modification and output to devices.
* Updated to newer Ghostscript version and fixed a bugEthan Vrhel2020-09-246-157/+294
| | | | | Updated to the newest Ghostscript version and fixed an ArrayIndexOutOfBoundsException bug when unloading zoomed pages.
* Added better documentationEthan Vrhel2020-09-247-56/+490
|
* Updated how zooming is handledEthan Vrhel2020-09-244-122/+137
| | | | | | | 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.
* Implemented distilling documentsEthan Vrhel2020-09-243-78/+129
| | | | | Users now have the option to distill a document if the desired input is not a PDF.
* Fixed zooming and some other bugs in the viewerEthan Vrhel2020-09-245-127/+97
| | | | | | | | 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 bugs and began updating viewer to use one GS instanceEthan Vrhel2020-09-245-37/+126
| | | | | | 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.
* Added init_with_args to the test code in Main.javaEthan Vrhel2020-09-241-3/+2
|
* Fixed a small error in test code in Main.javaEthan Vrhel2020-09-241-6/+0
|
* Finished updating to newer Ghostscript functionsEthan Vrhel2020-09-2416-693/+330
| | | | | | 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.
* Finished implementing the rest of Ghostscript functions in JavaEthan Vrhel2020-09-247-25/+92
| | | | | 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 in JavaEthan Vrhel2020-09-248-19/+256
| | | | | | Got gsapi_enumerate_params working and added a utility class to do the same work as gsapi_enumerate_params with a Java iterator.
* Got gsapi_set_param workingEthan Vrhel2020-09-249-248/+506
| | | | | | | 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.
* Worked on implementing new Ghoscript methods in JavaEthan Vrhel2020-09-243-51/+122
| | | | | Wrote out all native method signatures in Java and C++. Workekd on gsapi_add_control_path and associated helper methods.
* Worked on improving References in C++ codeEthan Vrhel2020-09-243-17/+354
|
* Progress on updating Java bindings to newest version.Ethan Vrhel2020-09-246-4/+216
| | | | Added some of the new methods, but currently none work.
* Fixed some errors related to loading pages too fastEthan Vrhel2020-09-243-46/+156
| | | | | | | 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.
* Added thread safety to the viewer.Ethan Vrhel2020-09-249-158/+467
| | | | | | | | 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.
* Progress on improving concurrencyEthan Vrhel2020-09-246-135/+370
| | | | | Added better exception handling. Began progress on handling concurrent operations better.
* Viewer now will load a higher resolution image on zoom.Ethan Vrhel2020-09-244-11/+88
| | | | | The high resolution image loads correctly, but the viewer does not correctly load the right page when in a zoom other than 1x.
* Optimizations to page loaderEthan Vrhel2020-09-244-31/+87
| | | | | | Page loader now only loads around where the use is viewing and does not load pages unless the user actually navigates to those pages.
* Progress on viewerEthan Vrhel2020-09-244-36/+183
| | | | | Optimizations and easier user interface as well as basic zooming implemented.
* Various bug fixes in viewerEthan Vrhel2020-09-245-91/+288
| | | | | Added utility methods in ViewerWindow.java to help with changing pages and zoom levels. Added framework for zooming pages.
* Got viewer workingevrhel2020-09-247-72/+293
| | | | | | | 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.
* Basic viewer workingevrhel2020-09-249-130/+504
| | | | | The viewer has basic capabilities, but still lacks loading high resolution images, spacing components, and resizing correctly.
* Worked on creating GUIevrhel2020-09-246-12/+585
| | | | | Added GUI (generated using NetBeans). Added support for callbacks into the GUI specifically related to the wanted viewer operations.
* Progress on Document class for handling a documentLoaderevrhel2020-09-244-133/+287
| | | | | | | 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.
* Converted original Java project to be used as a JAR libraryevrhel2020-09-2411-225/+54
| | | | | | | 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.
* Colors now being displayed correctly after getting imageevrhel2020-09-243-40/+20
| | | | | | 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.
* Fixes to display callback and C++ and added window to display imagesevrhel2020-09-248-59/+564
| | | | | Fixed Java methods not being found in C++ and added a window class to start displaying images.
* Implemented NativePointer methods in C++ and updated onDisplayPageevrhel2020-09-249-5/+367
| | | | | onDisplayPage now uses a BytePointer object for the pimage parameter to interface into native memory.
* Added new Java class allowing native access to memory blocksevrhel2020-09-249-7/+393
| | | | | Added NativePointer and NativeArray as two base classes for low-level memory-access alongside other classes to assist with this.
* Security improvements in native codeEthan Vrhel2020-09-244-19/+262
| | | | | | Fixed multiple points where the program could crash and instead returned NULL and/or threw a (safer) Java exception.
* Fixed how display_callback was being passed to Ghostscriptevrhel2020-09-236-20/+45
| | | | | | 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 some bugs related to stdioevrhel2020-09-232-9/+118
| | | | | Fixed stdio bugs and added some more utility methods to make calling ghostscript functions easier in Java.
* Completed JNI bindings to Ghostscriptevrhel2020-09-235-12/+77
| | | | | Added implementations for StdIO and display callback, and added some testing in main().
* Finished writing JNI bindings.evrhel2020-09-236-65/+290
| | | | | Finished writing JNI bindings and added more utility methods to help with setting Reference objects in Java.
* Progress on linking Ghostscript functions to Javaevrhel2020-09-2310-67/+480
| | | | | Added support for more functions and finished implementing display callback functions.
* Worked on implementing display_callback in Javaevrhel2020-09-238-49/+328
| | | | | | 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.
* Implemented Ghostscript functions in Java in the C++ projectevrhel2020-09-2331-13/+10881
| | | | | | 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.
* Finished writing ghostscript api signatures in GSAPI.javaevrhel2020-09-234-0/+76
|
* Progress on creating the JNI bindings to Ghostscript.evrhel2020-09-2310-0/+214
| | | | | | | 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.
* Java demo: Initial commit with READMEevrhel2020-09-231-0/+1
|
* Fix a compiler warningKen Sharp2020-09-231-1/+1
|
* pdfwrite - fix memory leak with annotationsKen Sharp2020-09-231-0/+23
| | | | | | | | | | | | | | | | | | | | | 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.