Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zathura-pdf-mupdf
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
7
Issues
7
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pwmt
zathura-pdf-mupdf
Commits
37851fd7
Commit
37851fd7
authored
Feb 14, 2016
by
Moritz Lipp
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release/0.3.0'
parents
f6474ec8
58a45393
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
23 deletions
+26
-23
LICENSE
LICENSE
+1
-1
config.mk
config.mk
+6
-3
plugin.h
plugin.h
+18
-18
render.c
render.c
+1
-1
No files found.
LICENSE
View file @
37851fd7
Copyright (c) 2011-201
4
pwmt.org
Copyright (c) 2011-201
6
pwmt.org
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
...
...
config.mk
View file @
37851fd7
# See LICENSE file for license and copyright information
VERSION_MAJOR
=
0
VERSION_MINOR
=
2
VERSION_REV
=
9
VERSION_MINOR
=
3
VERSION_REV
=
0
VERSION
=
${VERSION_MAJOR}
.
${VERSION_MINOR}
.
${VERSION_REV}
# minimum required zathura version
...
...
@@ -37,9 +37,12 @@ MUPDF_LIB ?= -lmupdf -lmujs
INCS
=
${GTK_INC}
${GIRARA_INC}
${OPENSSL_INC}
${ZATHURA_INC}
LIBS
=
${GTK_LIB}
${GIRARA_LIB}
${MUPDF_LIB}
${OPENSSL_LIB}
-ljbig2dec
-lopenjp2
-ljpeg
# flags
#
compiler
flags
CFLAGS
+=
-std
=
c99
-fPIC
-pedantic
-Wall
-Wno-format-zero-length
$(INCS)
# linker flags
LDFLAGS
+=
-fPIC
# debug
DFLAGS
?=
-g
...
...
plugin.h
View file @
37851fd7
...
...
@@ -31,7 +31,7 @@ typedef struct mupdf_page_s
* Open a pdf document
*
* @param document Zathura document
* @return true if no error occured, otherwise false
* @return true if no error occur
r
ed, otherwise false
*/
zathura_error_t
pdf_document_open
(
zathura_document_t
*
document
);
...
...
@@ -39,7 +39,7 @@ zathura_error_t pdf_document_open(zathura_document_t* document);
* Closes and frees the internal document structure
*
* @param document Zathura document
* @return true if no error occured, otherwise false
* @return true if no error occur
r
ed, otherwise false
*/
zathura_error_t
pdf_document_free
(
zathura_document_t
*
document
,
mupdf_document_t
*
mupdf_document
);
...
...
@@ -48,7 +48,7 @@ zathura_error_t pdf_document_free(zathura_document_t* document, mupdf_document_t
*
* @param document Zathura document
* @param path File path
* @return ZATHURA_ERROR_OK when no error occured, otherwise see
* @return ZATHURA_ERROR_OK when no error occur
r
ed, otherwise see
* zathura_error_t
*/
zathura_error_t
pdf_document_save_as
(
zathura_document_t
*
document
,
...
...
@@ -59,7 +59,7 @@ zathura_error_t pdf_document_save_as(zathura_document_t* document,
*
* @param document Zathura document
* @param error Set to an error value (see zathura_error_t) if an
* error occured
* error occur
r
ed
* @return Tree node object or NULL if an error occurred (e.g.: the document has
* no index)
*/
...
...
@@ -70,7 +70,7 @@ girara_tree_node_t* pdf_document_index_generate(zathura_document_t* document,
* Returns a reference to a page
*
* @param page Page object
* @return A page object or NULL if an error occured
* @return A page object or NULL if an error occur
r
ed
*/
zathura_error_t
pdf_page_init
(
zathura_page_t
*
page
);
...
...
@@ -78,7 +78,7 @@ zathura_error_t pdf_page_init(zathura_page_t* page);
* Frees a pdf page
*
* @param page Page
* @return true if no error occured, otherwise false
* @return true if no error occur
r
ed, otherwise false
*/
zathura_error_t
pdf_page_clear
(
zathura_page_t
*
page
,
mupdf_page_t
*
mupdf_page
);
...
...
@@ -88,8 +88,8 @@ zathura_error_t pdf_page_clear(zathura_page_t* page, mupdf_page_t* mupdf_page);
* @param page Page
* @param text Search item
* @param error Set to an error value (see zathura_error_t) if an
* error occured
* @return List of search results or NULL if an error occured
* error occur
r
ed
* @return List of search results or NULL if an error occur
r
ed
*/
girara_list_t
*
pdf_page_search_text
(
zathura_page_t
*
page
,
mupdf_page_t
*
mupdf_page
,
const
char
*
text
,
zathura_error_t
*
error
);
...
...
@@ -98,8 +98,8 @@ girara_list_t* pdf_page_search_text(zathura_page_t* page, mupdf_page_t* mupdf_pa
*
* @param page Page
* @param error Set to an error value (see zathura_error_t) if an
* error occured
* @return List of links or NULL if an error occured
* error occur
r
ed
* @return List of links or NULL if an error occur
r
ed
*/
girara_list_t
*
pdf_page_links_get
(
zathura_page_t
*
page
,
mupdf_page_t
*
mupdf_page
,
zathura_error_t
*
error
);
...
...
@@ -108,7 +108,7 @@ girara_list_t* pdf_page_links_get(zathura_page_t* page, mupdf_page_t* mupdf_page
*
* @param page The page
* @param error Set to an error value (see zathura_error_t) if an
* error occured
* error occur
r
ed
* @return List of images
*/
girara_list_t
*
pdf_page_images_get
(
zathura_page_t
*
page
,
mupdf_page_t
*
mupdf_page
,
zathura_error_t
*
error
);
...
...
@@ -120,8 +120,8 @@ girara_list_t* pdf_page_images_get(zathura_page_t* page, mupdf_page_t* mupdf_pag
* @param page Page
* @param image Image identifier
* @param error Set to an error value (see \ref zathura_error_t) if an
* error occured
* @return The cairo image surface or NULL if an error occured
* error occur
r
ed
* @return The cairo image surface or NULL if an error occur
r
ed
*/
cairo_surface_t
*
pdf_page_image_get_cairo
(
zathura_page_t
*
page
,
mupdf_page_t
*
mupdf_page
,
zathura_image_t
*
image
,
zathura_error_t
*
error
);
...
...
@@ -132,7 +132,7 @@ cairo_surface_t* pdf_page_image_get_cairo(zathura_page_t* page, mupdf_page_t*
* @param page Page
* @param rectangle Selection
* @error Set to an error value (see \ref zathura_error_t) if an error
* occured
* occur
r
ed
* @return The selected text (needs to be deallocated with g_free)
*/
char
*
pdf_page_get_text
(
zathura_page_t
*
page
,
mupdf_page_t
*
mupdf_page
,
zathura_rectangle_t
rectangle
,
zathura_error_t
*
error
);
...
...
@@ -142,7 +142,7 @@ char* pdf_page_get_text(zathura_page_t* page, mupdf_page_t* mupdf_page, zathura_
*
* @param document Zathura document
* @param error Set to an error value (see zathura_error_t) if an
* error occured
* error occur
r
ed
* @return List of information entries or NULL if an error occurred
*/
girara_list_t
*
pdf_document_get_information
(
zathura_document_t
*
document
,
...
...
@@ -154,8 +154,8 @@ girara_list_t* pdf_document_get_information(zathura_document_t* document,
*
* @param page Page
* @param error Set to an error value (see zathura_error_t) if an
* error occured
* @return Image buffer or NULL if an error occured
* error occur
r
ed
* @return Image buffer or NULL if an error occur
r
ed
*/
zathura_image_buffer_t
*
pdf_page_render
(
zathura_page_t
*
page
,
mupdf_page_t
*
mupdf_page
,
zathura_error_t
*
error
);
...
...
@@ -165,7 +165,7 @@ zathura_image_buffer_t* pdf_page_render(zathura_page_t* page, mupdf_page_t* mupd
*
* @param page Page
* @param cairo Cairo object
* @return true if no error occured, otherwise false
* @return true if no error occur
r
ed, otherwise false
*/
zathura_error_t
pdf_page_render_cairo
(
zathura_page_t
*
page
,
mupdf_page_t
*
mupdf_page
,
cairo_t
*
cairo
,
bool
printing
);
#endif
...
...
render.c
View file @
37851fd7
...
...
@@ -36,7 +36,7 @@ pdf_page_render_to_buffer(mupdf_document_t* mupdf_document, mupdf_page_t* mupdf_
fz_irect
irect
=
{
.
x1
=
page_width
,
.
y1
=
page_height
};
fz_rect
rect
=
{
.
x1
=
page_width
,
.
y1
=
page_height
};
fz_colorspace
*
colorspace
=
fz_device_
rgb
(
mupdf_document
->
ctx
);
fz_colorspace
*
colorspace
=
fz_device_
bgr
(
mupdf_document
->
ctx
);
fz_pixmap
*
pixmap
=
fz_new_pixmap_with_bbox_and_data
(
mupdf_page
->
ctx
,
colorspace
,
&
irect
,
image
);
fz_clear_pixmap_with_value
(
mupdf_page
->
ctx
,
pixmap
,
0xFF
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment