Giter VIP home page Giter VIP logo

polympic's Introduction

Here presents PolymiumPic, the currently fully opensourced part of PolymPic.

Just like chrome, it will become a fantastic web browser + a PDF viewer.

The Web Browser

  • WIP 75%
  • Multi-window interface that supports retoring of browser states ( the page positions and the back/forward stacks ).
  • WIP 55% Annotation functionality. (still testing)
  • Optional CrossWalk or TBS-X5 webview implemetation.

The PDF Viewer

  • WIP 90% Based on PDFium.
  • Basic highlight annotatin support.
  • Smooth scrolling and flinging available even for android 4.4.
  • Make use of Colordict and Google Translate for easy reading.

The PDF viewer supports content URI and will request permisison at runtime. You can still use it if you deny it's permission requests, entering read-only mode.

Download

The first Alpha version has been released. Check that and all feedbacks are welcomed.

How to Build:

This is a 'complex' project which consists of multiple gradle sub-modules. You need to download them manually from the following separate repos:

  1. https://github.com/KnIfER/AppPreference
  2. https://github.com/KnIfER/AweDesigner
  3. https://github.com/KnIfER/AwtRecyclerView
  4. https://github.com/KnIfER/AxtAppCompat
  5. https://github.com/KnIfER/GlideModule
  6. https://github.com/KnIfER/XWalkModule
  7. ( Some may be missing. )

For some reason I've modified those 3rd party libaries but don't want to include them in my repo.

If you don't want to download them, then go and grab the current archives exported directly from the Android Studio.


Some other dependencies:

Jar File Use Included in the repo
ActivityLauncher\libs\core-3.3.3.jar Zxing qrcode Yes
XWalkModule\libs\crosswalk-shared-23.53.589.4.aar CrossWalk's R.txt XWalkModule
multiline\libs\closure-compiler-v20200628.jar To compile js scripts No. It's in the archive

How to invoke PolymPic (the App) and view PDFs at a specific page in your own project:

  1. Essential
	Intent it = new Intent(Intent.ACTION_VIEW)
		.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
		.putExtra("page", yourPage)
		.setDataAndType(yourUri, "application/pdf");
	startActivity(it);
  1. Verbose
	Intent it = new Intent(Intent.ACTION_VIEW);
	it.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
	File f = new File("/sdcard/download/....");
	if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
		StrictMode.setVmPolicy(new VmPolicy.Builder().build());
	}
	int pageId=8;
	it.putExtra("page", pageId);
	it.setDataAndType(Uri.fromFile(f), "application/pdf");
	startActivity(it);

polympic's People

Contributors

knilight avatar knifer avatar

Stargazers

David Zhou avatar Cnbbx avatar Chancey avatar Jack Black avatar mickelfeng avatar  avatar Luke Wong avatar Bruce Yan avatar zfanplus avatar  avatar moyearzhou avatar  avatar  avatar 骑猪看世界 avatar  avatar  avatar wangshenglongrc avatar John Qing avatar Phong Nguyen avatar  avatar  avatar Karthik Kompelli avatar  avatar zeromake avatar  avatar  avatar GuanGang.Liu avatar  avatar  avatar  avatar  avatar Shashank Daima avatar 弯弯豆豆 avatar SymbolStar avatar  avatar  avatar  avatar  avatar Pavel Kuznetsov avatar xtuzy avatar  avatar Anric avatar Abu Nayem avatar

Watchers

Justin(Moo Chan) Song avatar James Cloos avatar Ahmer Afzal avatar  avatar  avatar

polympic's Issues

Suggestion

First of all thanks for this great PdfViewer library based on Pdfium. I request you please become a maintainer for barteksc PdfViewer so everyone benefit from you.

屏幕坐标转换成pdf page 坐标问题

Hi, @KnIfER 无意中看到了你的文章 制作安卓PDF阅读器:三、实现文本选择, 觉得写的很不错,不过有一个问题没太明白, 想请教一下。

需要将屏幕坐标转换为页面坐标,然后再次在native层转换为所谓的user space、page space。别问我那是啥我也不知道。不过在论坛提问后,有人替我指出了相关文档所在,有时间去看看!

"User space" is defined in section 8.3.2.3 of the PDF 32000-1:2008 specification.

屏幕坐标:[event.getX(), event.getY()]
页面坐标:先前提过将整本PDF当作一张超级大图,subsampling-scale-imageview 有一系列的 viewToSource 坐标转换方法。屏幕转换得到 source 坐标后,减去点击页面的左上角坐标,就是页面坐标。

原始页面坐标需用 FPDF_DeviceToPage 再次转换,才能传给FPDFLink_GetLinkAtPoint,获取坐标处的链接指针。

上述描述中的坐标转换问题在没有上下文的情况下不好理解,能否分享一下实现思路? 感谢, :)

Modules Not find on build gradle.

Kindly upload the working Apk code, which is compiled able.
When compiling your code so many modules are not configured so facing a lot of errors.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.