summaryrefslogtreecommitdiff
path: root/platform/x11
AgeCommit message (Collapse)Author
2016-11-23Add 'X' option to disable document styles.Tor Andersson
2016-11-21Harden viewers against failures when loading outlines.Tor Andersson
Ignore invalid page references in outlines. This was shown by a file that had [null 0 0 1] as a link dest. Attempting to parse that threw an error, which caused the whole outline load to fail.
2016-11-17Do cleanup when dropping curl stream.Sebastian Rasmussen
2016-11-16Fix 697334: disable text input in x11 viewer permanently.Tor Andersson
The hacky stdin workaround has never worked satisfactorily. Just nuke it.
2016-11-14Make fz_buffer structure private to fitz.Robin Watts
Move the definition of the structure contents into new fitz-imp.h file. Make all code outside of fitz access the buffer through the defined API. Add a convenience API for people that want to get buffers as null terminated C strings.
2016-11-14Add/fix page coordinates to link targets.Tor Andersson
Correctly transformed target coordinates for PDF. Target coordinates for EPUB and HTML.
2016-10-28Clean up link destination handling.Tor Andersson
All link destinations should be URIs, and a document specific function can be called to resolve them to actual page numbers. Outlines have cached page numbers as well as string URIs.
2016-10-26Update ios/android to use new way of passion stext options.Sebastian Rasmussen
In addition, make all callers passing 0 as a point pass NULL instead.
2016-10-18Avoid checking argument to fz_drop_*()/fz_free().Sebastian Rasmussen
As fz_drop_*()/fz_free() all must handle NULL.
2016-10-16Only check digital signature when mouse button is released.Sebastian Rasmussen
2016-10-10Bug 697094: Disable viewer text input on linux.Robin Watts
Only Windows and Android have form filling text input implemented properly so far. Neither of those build using the Makefile. We therefore disable text input in Makefile built viewers.
2016-10-07Remove separate tmp/deleted/changed annotation lists.Tor Andersson
Use a flag in the pdf_annot struct instead. Don't pass pdf_document to annotation edit functions.
2016-09-23Bug 697021: Count used string space correctly.Sebastian Rasmussen
Account for used space before comparison, not after.
2016-09-23Bug 697020: Remove variable only ever written to.Sebastian Rasmussen
2016-09-08Use fz_vsnprintf() in x11 viewer.Sebastian Rasmussen
2016-09-08Add options to control heuristics in structured text.Sebastian Rasmussen
2016-09-08Handle too big pixmap by printing error message in X11 viewer.Sebastian Rasmussen
2016-07-14x11: Update x11/win32 viewer for fz_close_device changes.Tor Andersson
2016-07-13Bug 696699: Fix Text extraction mediabox information.Robin Watts
Since the removal of the begin_page device function, structured text extraction has been unable to correctly establish the mediabox for extracted pages. Update the fz_new_stext_page call to take this mediabox information. This is an API change, but hopefully most people are calling fz_new_stext_page_from_page or fz_new_stext_page_from_display_list which are updated here to cope. Update all the apps/tools to behave properly.
2016-07-08Slim pdf_annot struct: remove cached annot_type and widget_type fields.Tor Andersson
2016-07-06x11: Fix segfault when creating presentation transitions.Tor Andersson
2016-07-06Start slimming pdf_page.Tor Andersson
We want to turn pdf_page into a thin wrapper around a pdf_obj, so that any updates to the underlying PDF objects will be reflected without having to reload the pdf_page.
2016-06-20Bug 696835: Reverse zoom in/zoom out mouse controls.Robin Watts
We had these reversed. Doesn't matter too much with a mouse, but matters a lot more on a touch screen when the same signals are used to do pinch zoom.
2016-06-17Add mediabox argument to fz_new_display_list.Tor Andersson
To return the proper size from fz_bound_display_list, which has been broken since the begin_page device call was removed.
2016-06-17Add device space transform state to draw device.Tor Andersson
Allows us to remove the out parameter 'transform' from fz_begin_page.
2016-06-17Use 'size_t' instead of int as appropriate.Robin Watts
This silences the many warnings we get when building for x64 in windows. This does not address any of the warnings we get in thirdparty libraries - in particular harfbuzz. These look (at a quick glance) harmless though.
2016-06-16Drop save_alpha argument from image writing functions.Tor Andersson
2016-06-14Fix typos in various parts of the code.Sebastian Rasmussen
2016-06-13Bug 696822: Refuse to save a pdf file incrementally if it would break.Robin Watts
If a file cannot be saved incrementally, then don't accept that as an option. In practise this means if someone asks to save a file incrementally, and it was repaired, or it uses encryption then throw an error. Add a new function to ask if it's safe to save a file incrementally, and use that in the appropriate places.
2016-05-24fz_pixmap revamp: add stride and make alpha optionalRobin Watts
fz_pixmaps now have an explicit stride value. By default no change from before, but code all copes with extra gaps at the end of the line. The alpha data in fz_pixmaps is no longer compulsory. mudraw: use rgb not rgba (ppmraw), cmyk not cmyka (pkmraw). Update halftone code to not expect alpha plane. Update PNG writing to cope with alpha less input. Also hide repeated params within the png output context. ARM code needs updating.
2016-05-24Fix -p password option for MuPDF on Windows.Robin Watts
2016-05-04Update mupdf-curl to cope with https.Robin Watts
Spot https and pass to curl. If curl isn't built with https support we'll fail, but then we'd fail anyway without trying.
2016-04-27Fix 696543: Don't launch search with empty string.Tor Andersson
2016-04-26Change order of arguments to pdf_add_page etc.Tor Andersson
Resources are defined before they are used; so it's only logical to have the resource dictionary before the content buffer in the argument list.
2016-03-31Initialize disabled document writing flags to zeroSebastian Rasmussen
Also remove redundant assignments. Fixes http://bugs.ghostscript.com/show_bug.cgi?id=695968
2016-03-14Remove begin_page and end_page device calls.Tor Andersson
To be moved into a new document writer interface later.
2016-03-01Don't use pdf_page struct when creating pages.Tor Andersson
2016-02-29Pass mediabox to pdf_create_page by const pointer, and pass resources.Tor Andersson
2016-02-29Change order of arguments to pdf_create_page.Tor Andersson
2016-02-29Add mutool create tool, and PDF font and image resource creation.Michael Vrhel
Initial framework for creating pdfs This adds a create option to mutool for us to use in working on the API for creating content as well as adding content to existing documents. mutool create: Get page sizes and add them Start the parsing of the contents.txt file which may have multiple page information. Add the pages at the proper sizes. Further work on mutool create_pdf Remove the calls that were being made to the pdf-write device. Clean up several issues with the reading of the page contents. Get the content streams for each page associated with the page->contents Temp. created a pdf_create_page_contents procedure. I will merge this with pdf_create_page as there is significant overlap. Next is to add in the font and image resources and indirect references. Include pdfcreate in build Merge pdf_create_page_contents and pdf_create_page Add support for images in pdfcreate This adds images to the pdf document using a function stolen from pdf-device (send_image). This was renamed pdf_add_image_res and added to pdf-image. Down the road, send-image will be removed. Prior to that, I need to work on making sure that multiple copies of the same image do not end up in the document. Code was also added to create the page resources to point to the proper image in the document. Next fonts will be added in a similar manner, then I will work on computing the md5 sums of image and fonts to ensure only one copy ends up in the document. Then pdf-write will be reworked to use the same code as opposed to its current list of md5 sums that are stored in a device structure. mutool pdfcreate: support for WinAnsiEncoded fonts Added support for very simple fonts (WinAnsiEncoding). Methods added in pdf-font.c. Added first_width and last_width to fz_font_s and stem_v to pdf_font_desc_s. Ran code through memento with simple test of 4 page document creation including an image and a font. Fixed several leaks as well as buffer corruption issues (main changes in pdfcreate). Thanks to Robin for the help with Memento in finding leaks. Added StemV to pdf names as it was needed for the font descriptor creation. Fix for pdf_write_document rename to pdf_save_document Add resource_ids to pdf document structure The purpose of this structure will be to allow the search and reuse of resources when we attempt to add new ones to the document. Fix name changes from recent updates pdf_create branch updated to work with recent changes in master Initial use of hash table for resources To avoid adding in the same resource this adds a resource_tables member to pdf_document. The resource_tables structure consists of multiple fz_hash_table entries, one for each resource type. When an attempt is made to search for an existing resource, the table will be initialized in a brute force search for existing resources. Currently this is only set up for the image resources and accessed through pdf_add_image_res. If a match is found, the reference object is returned. If no match is found NULL is returned and the ref object created in pdf_add_image_res is added into the hash table. In this case, a command line such as create -o output.pdf -f F0:font.ttf -i Im0:image.jpg -i Im1:image1.jpg \\ -i Im2:image.jpg contents.txt will avoid the insertion of two copies of image.jpg into the output PDF document. CID Identity-H Font added for handing ttf This adds a method for adding a ttf to a PDF as a CID font with Identity-H mapping and a ToUnicode entry that is created using FT_Get_Char_Index This takes much care in the creation of the ToUnicode CMap to ensure that the minimum number of entries are created in that we try to use beginbfrange as much as possible before using beginbfchar. The code makes sure to limit the number of entries in a group to 100 and to not cross first-byte boundaries for the CID values as described in the Adobe Technical note 5411. Add missing file pdf-resources.c pdf-resources.c was missing and should have been committed earlier. Added to windows project file. Not sure where else it needs to be added for the other platforms. Clean up names and spacing Make sure that the visible functions have the proper namespace (e.g. pdf_xxxx) Also make sure we have a blank line prior to comment. Be consistent with static function naming in pdf_resources.c pdfwrite make use of image resource fz_hash_table The pdfwrite device now shares the structure that stores the resource images for pdfcreate. With this fix, pdfwrite now avoids duplicating the writing of the same images that are shared across multiple pages. Add missing file pdf-resources.c Initial work toward having pdfwrite use Identity-H Type0 encoding for fonts Finish of CID type0 Identity-H font for pdfwrite This adds in the proper widths which may have been stored in the source font in the width table (parsed from the W entry in the pdf file) or if the free type structure has its own cmap then we can get the width from free type. Widths are restructured into format described in 5.6.3 of PDF spec. Fix issue from conflict merging and multiple define of structure Clean up warnings and make mutool create use simple font
2016-01-28Make (old) Win32 viewer honour user css file.Robin Watts
2016-01-05Remove fz_page argument from fz_annot function calls.Tor Andersson
2015-12-28Drop 'jsimp' abstraction and use mujs directly.Tor Andersson
2015-12-18Remove fz_save_document and use pdf_save_document directly instead.Tor Andersson
In preparation of adding pdf_write_document that writes a document to a fz_output stream.
2015-12-15Rename fz_write_x to fz_save_pixmap_as_x or fz_save_bitmap_as_x.Tor Andersson
Separate naming of functions that save complete files to disk from functions that write data to streams.
2015-12-11Rename structured text structs and functions to 'stext'.Tor Andersson
Less risk of confusion with the text type used in the device interface.
2015-10-15x11: Add generic pixel conversion function.Tor Andersson
Slow, but at least it won't crash. Fix for bug 695742.
2015-10-14Add proper support for when a combobox widget has options that are 2-element ↵Michael Vrhel
arrays The list box and combo box can have values that are 2-element arrays. The first element is the "export" value and the second element is the value that should be shown in the list box UI. This fix ensures that we get the proper value to show in the UI. Also, it adds the option to get the export values. These are needed if you wish to update the field dictionary's V (value) entry, which is the currently selected values(s). This fix works well with gsview. The other viewers will now display the proper content in their UI, (unlike before this fix) but may need a bit more work to ensure that the proper V (value) is updated with changes in the selections. In addition, we add selection rectangles to the selected list box items.
2015-10-02Bug 696058: Up maximum zoom resolution to 1152.Robin Watts
It is conceivable that this might run into problems on 32bit builds with suitably large bitmaps, but, hey, don't zoom that far.
2015-09-28Bug 696169: Fix MINGW build of MuPDF.Robin Watts
Include pdfapp.h after the UNICODE defines to ensure that the correct version of the Windows string functions are used. Thanks to Tamir Evan for this workaround.