本文整理汇总了Java中com.shockwave.pdfium.PdfiumCore类的典型用法代码示例。如果您正苦于以下问题:Java PdfiumCore类的具体用法?Java PdfiumCore怎么用?Java PdfiumCore使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PdfiumCore类属于com.shockwave.pdfium包,在下文中一共展示了PdfiumCore类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: PDFView
import com.shockwave.pdfium.PdfiumCore; //导入依赖的package包/类
/**
* Construct the initial view
*/
public PDFView(Context context, AttributeSet set) {
super(context, set);
renderingHandlerThread = new HandlerThread("PDF renderer");
if (isInEditMode()) {
return;
}
cacheManager = new CacheManager();
animationManager = new AnimationManager(this);
dragPinchManager = new DragPinchManager(this, animationManager);
paint = new Paint();
debugPaint = new Paint();
debugPaint.setStyle(Style.STROKE);
pdfiumCore = new PdfiumCore(context);
setWillNotDraw(false);
}
示例2: PDFView
import com.shockwave.pdfium.PdfiumCore; //导入依赖的package包/类
/**
* Construct the initial view
*/
public PDFView(Context context, AttributeSet set) {
super(context, set);
if (isInEditMode()) {
return;
}
cacheManager = new CacheManager();
animationManager = new AnimationManager(this);
dragPinchManager = new DragPinchManager(this, animationManager);
paint = new Paint();
debugPaint = new Paint();
debugPaint.setStyle(Style.STROKE);
pdfiumCore = new PdfiumCore(context);
setWillNotDraw(false);
}
示例3: PDFView
import com.shockwave.pdfium.PdfiumCore; //导入依赖的package包/类
/** Construct the initial view */
public PDFView(Context context, AttributeSet set) {
super(context, set);
renderingHandlerThread = new HandlerThread("PDF renderer");
if (isInEditMode()) {
return;
}
cacheManager = new CacheManager();
animationManager = new AnimationManager(this);
dragPinchManager = new DragPinchManager(this, animationManager);
pagesLoader = new PagesLoader(this);
paint = new Paint();
debugPaint = new Paint();
debugPaint.setStyle(Style.STROKE);
pdfiumCore = new PdfiumCore(context);
setWillNotDraw(false);
}
示例4: DecodingAsyncTask
import com.shockwave.pdfium.PdfiumCore; //导入依赖的package包/类
DecodingAsyncTask(DocumentSource docSource, String password, PDFView pdfView, PdfiumCore pdfiumCore, int firstPageIdx) {
this.docSource = docSource;
this.firstPageIdx = firstPageIdx;
this.cancelled = false;
this.pdfView = pdfView;
this.password = password;
this.pdfiumCore = pdfiumCore;
context = pdfView.getContext();
}
示例5: printPdfInfo
import com.shockwave.pdfium.PdfiumCore; //导入依赖的package包/类
public void printPdfInfo(final PdfiumCore core, final PdfDocument doc) {
PdfDocument.Meta meta = core.getDocumentMeta(doc);
BookLibApplication.e(LOG_TAG + "title = " + meta.getTitle());
BookLibApplication.e(LOG_TAG + "author = " + meta.getAuthor());
BookLibApplication.e(LOG_TAG + "subject = " + meta.getSubject());
BookLibApplication.e(LOG_TAG + "keywords = " + meta.getKeywords());
BookLibApplication.e(LOG_TAG + "creator = " + meta.getCreator());
BookLibApplication.e(LOG_TAG + "producer = " + meta.getProducer());
BookLibApplication.e(LOG_TAG + "creationDate = " + meta.getCreationDate());
BookLibApplication.e(LOG_TAG + "modDate = " + meta.getModDate());
}
示例6: RenderingAsyncTask
import com.shockwave.pdfium.PdfiumCore; //导入依赖的package包/类
public RenderingAsyncTask(PDFView pdfView, PdfiumCore pdfiumCore, PdfDocument pdfDocument) {
this.pdfView = pdfView;
this.pdfiumCore = pdfiumCore;
this.pdfDocument = pdfDocument;
this.renderingTasks = Collections.synchronizedList(new ArrayList<RenderingTask>());
}
示例7: DecodingAsyncTask
import com.shockwave.pdfium.PdfiumCore; //导入依赖的package包/类
public DecodingAsyncTask(String path, boolean isAsset, String password, PDFView pdfView, PdfiumCore pdfiumCore) {
this.cancelled = false;
this.pdfView = pdfView;
this.isAsset = isAsset;
this.password = password;
this.pdfiumCore = pdfiumCore;
this.path = path;
context = pdfView.getContext();
}
示例8: PDFView
import com.shockwave.pdfium.PdfiumCore; //导入依赖的package包/类
/**
* Construct the initial view
*/
public PDFView(Context context, AttributeSet set) {
super(context, set);
renderingHandlerThread = new HandlerThread("PDF renderer");
if (isInEditMode()) {
return;
}
miniMapRequired = false;
cacheManager = new CacheManager();
animationManager = new AnimationManager(this);
dragPinchManager = new DragPinchManager(this, animationManager);
paint = new Paint();
debugPaint = new Paint();
debugPaint.setStyle(Style.STROKE);
paintMinimapBack = new Paint();
paintMinimapBack.setStyle(Style.FILL);
paintMinimapBack.setColor(Color.BLACK);
paintMinimapBack.setAlpha(50);
paintMinimapFront = new Paint();
paintMinimapFront.setStyle(Style.FILL);
paintMinimapFront.setColor(Color.BLACK);
paintMinimapFront.setAlpha(50);
// A surface view does not call
// onDraw() as a default but we need it.
setWillNotDraw(false);
pdfiumCore = new PdfiumCore(context);
}
示例9: DecodingAsyncTask
import com.shockwave.pdfium.PdfiumCore; //导入依赖的package包/类
public DecodingAsyncTask(DocumentSource docSource, String password, PDFView pdfView, PdfiumCore pdfiumCore) {
this.docSource = docSource;
this.cancelled = false;
this.pdfView = pdfView;
this.password = password;
this.pdfiumCore = pdfiumCore;
context = pdfView.getContext();
}
示例10: PdfFile
import com.shockwave.pdfium.PdfiumCore; //导入依赖的package包/类
PdfFile(PdfiumCore pdfiumCore, PdfDocument pdfDocument, FitPolicy pageFitPolicy, Size viewSize, int[] originalUserPages,
boolean isVertical, int spacing) {
this.pdfiumCore = pdfiumCore;
this.pdfDocument = pdfDocument;
this.pageFitPolicy = pageFitPolicy;
this.originalUserPages = originalUserPages;
this.isVertical = isVertical;
this.spacingPx = spacing;
setup(viewSize);
}
示例11: DecodingAsyncTask
import com.shockwave.pdfium.PdfiumCore; //导入依赖的package包/类
DecodingAsyncTask(DocumentSource docSource, String password, int[] userPages, PDFView pdfView, PdfiumCore pdfiumCore) {
this.docSource = docSource;
this.userPages = userPages;
this.cancelled = false;
this.pdfView = pdfView;
this.password = password;
this.pdfiumCore = pdfiumCore;
}
示例12: RenderingHandler
import com.shockwave.pdfium.PdfiumCore; //导入依赖的package包/类
RenderingHandler(Looper looper, PDFView pdfView, PdfiumCore pdfiumCore, PdfDocument pdfDocument) {
super(looper);
this.pdfView = pdfView;
this.pdfiumCore = pdfiumCore;
this.pdfDocument = pdfDocument;
}
示例13: createDocument
import com.shockwave.pdfium.PdfiumCore; //导入依赖的package包/类
@Override
public PdfDocument createDocument(Context context, PdfiumCore core, String password) throws IOException {
ParcelFileDescriptor pfd = context.getContentResolver().openFileDescriptor(uri, "r");
return core.newDocument(pfd, password);
}
示例14: createDocument
import com.shockwave.pdfium.PdfiumCore; //导入依赖的package包/类
@Override
public PdfDocument createDocument(Context context, PdfiumCore core, String password) throws IOException {
return core.newDocument(Util.toByteArray(inputStream), password);
}
示例15: createDocument
import com.shockwave.pdfium.PdfiumCore; //导入依赖的package包/类
@Override
public PdfDocument createDocument(Context context, PdfiumCore core, String password) throws IOException {
File f = FileUtils.fileFromAsset(context, assetName);
ParcelFileDescriptor pfd = ParcelFileDescriptor.open(f, ParcelFileDescriptor.MODE_READ_ONLY);
return core.newDocument(pfd, password);
}