- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我在android中实现了MuPDf来打开,查看,搜索,设置书签 等用于 PDF。现在我想要水平翻转的动画效果,即类似于在 FlipBoard 应用程序中以水平方式使用的效果。
我还需要知道如何突出显示搜索文本。我正在使用 Librelio's code
我浏览了如下链接:
请帮忙。
最佳答案
I also need to know that how can i highlight the Search Text.
PageView.java of MuPDF:
private static final int HIGHLIGHT_COLOR = 0x802572AC; //adjust the color
...//some code of PageView.java
public void setPage(int page, PointF size) {
...//code of PageView.setPage(int page, PointF size)
// this is the part where the hightlighting happens
if (!mIsBlank && mSearchBoxes != null) {
paint.setColor(HIGHLIGHT_COLOR);
for (RectF rect : mSearchBoxes)
canvas.drawRect(rect.left*scale, rect.top*scale,
rect.right*scale, rect.bottom*scale, paint);
// you can customize it, e.g.
// int margin = 5
//canvas.drawRect((rect.left - margin) * scale, (rect.top - margin) * scale,
//(rect.right + margin) * scale, (rect.bottom + margin) * scale, paint);
}
}
要开始搜索,只需调用:
new SearchTask(context, mupdfCore).go("searchText", 1, 0, -1);
关于android - 使用 MuPDF 像翻转板一样水平翻转,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23213394/
我已经使用一些 MuPDFs 修改 API 编辑了一个 PDF,但我不知道如何将这个修改后的 PDF 保存到磁盘。这可能吗?如果是这样,我该如何保存此 PDF? 最佳答案 您需要调用 pdf_writ
我正在使用 mupdf 在我的 c++ 应用程序中呈现 PDF,但我还需要编辑 PDF(例如插入图片),但我无法终生弄清楚如何 - 它没有很好地记录。 Ghostscript 说 mupdf 中有一个
我正在尝试编译 MuPDF 库的最新版本(今天克隆了 git repo)。 从 git 中查看 mupdf 源代码的副本: git clone git://git.ghostscript.com/mu
我正在使用 MuPDF 在我的 android 应用程序中打开和编辑 PDF,但我需要一些方法来以位图格式获取当前页面。 我一直在阅读代码,但我没有成功。有人可以帮助我吗? 最佳答案 我们在 Andr
我正在尝试编译 mupdf在 Windows 7 上使用 mingw gcc。 context.h 中的以下行异常(exception) #define fz_throw(CTX, ERRCODE,
我使用 Mupdf Library 实现了电子书应用程序,并希望为我的项目中的每个 pdf 文件生成缩略图谁能告诉我如何生成这个?提前致谢 最佳答案 在 Librelio 中,他们使用的是没有 Coo
我正在将 MUPDF 添加到 android 应用程序中: (1) http://mupdf.blogspot.com/ (2) http://pastebin.com/YzHUhzE7 当我尝试做的
您好,我在我的项目中使用 MuPdf 库来查看文档。问题是,当您在 11 英寸平板电脑上的 Activity 中打开 3-7 个文档时,我会出现内存溢出。当您加载一个新文档时,对先前文档的所有引用都将
我试图将 mupdf 导入我的应用程序,但是当我打开它时,我遇到了一些奇怪的错误,它会强制关闭。为什么?我真的不明白。 这是我的日志: 10-10 15:34:17.802 8657-8657/
我是新的 Android 开发者。我的项目正在使用 android 的 mupdf 来签名到 pdf 文件。我正在使用 android 的源代码 mupdf(源代码在这里 https://github
我的代码为MuPDF Library我想在我的应用程序中使用它。我尝试导入该项目并尝试运行它。 但问题是它运行正常,并在应用程序启动时显示 PDF 文件列表,但当我选择任何 pdf 文件时,它就会崩溃
我想将 MUPDF 源添加到我的项目并在我的应用程序上显示 pdf。 我在下面的链接中执行了所有这些步骤 http://mupdf.blogspot.com/ 然后像这里写的那样将类添加到项目中
我最近在我的项目中加入了 MuPDF 来加载 PDF 文件,我想为 PDF 实现放大镜功能。 我已经查看了无论如何都找不到的文档,无法将 X 的矩形发送到 MuPDF 并使用位图进行响应。 如有任何指
我已经为 android 构建了 MUPDF 库,它可以很好地查看 pdf,但是有人知道我如何能够使用 mupdf 使用超链接查看 pdf,因为 mupdf 说支持超链接????? 最佳答案 最近几天
我在我的一个项目中使用 mupdf。几乎满足了我的要求,只是不知道是否支持添加新页面或替换新页面? mupdf的demo展示了如何给当前页面添加图层(在页面上绘制)并保存。但是我找不到添加新页面和删除
我正在尝试使用 waf 进行实验(构建系统)在 mupdf . 我在编译时遇到编译器错误 mupdf\fitz\dev_gdiplus.cpp . ..\..\..\mupdf\fitz\dev_gd
我正在尝试使用 MuPDF 库将 PDF 文件导出为 SVG 数据。我为此任务编写了以下函数: PDFIMPORT_DECLSPEC int PDFImport::createSVGDataStr(
当我调用 fz_run_page() 时,MuPDF 只将实际的 PDF 对象绘制到像素图上 (例如文本、图像、 vector 图形等)。 它不绘制页面边界框并用静态颜色(例如白色)填充它。有没有办法
我正在使用 MUPDF 库,我添加了手动放大、缩小、评级、设置亮度的功能。现在我正在长按突出显示的文本,我必须显示我的数据库中的含义。我正在尝试做两件事,一件是剪贴板或 emulateShiftHel
我在android中实现了MuPDf来打开,查看,搜索,设置书签 等用于 PDF。现在我想要水平翻转的动画效果,即类似于在 FlipBoard 应用程序中以水平方式使用的效果。 我还需要知道如何突出显
我是一名优秀的程序员,十分优秀!