You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey man, can I ask you something, let's say I have a docx file, with 3 pages, how can I output each page as a bitmap or image (returns a list of bitmaps? ). With your code given:
private void initControl() {
control = new MainControl(this);
control.setOffictToPicture(new IOfficeToPicture() {
public Bitmap getBitmap(int componentWidth, int componentHeight) {
if (componentWidth == 0 || componentHeight == 0) {
return null;
}
if (bitmap == null
|| bitmap.getWidth() != componentWidth
|| bitmap.getHeight() != componentHeight) {
// custom picture size
if (bitmap != null) {
bitmap.recycle();
}
bitmap = Bitmap.createBitmap((int) (componentWidth), (int) (componentHeight), Bitmap.Config.ARGB_8888);
}
return bitmap;
}
public void callBack(Bitmap bitmap) {
saveBitmapToFile(bitmap);
}
private Bitmap bitmap;
@Override
public void setModeType(byte modeType) {
}
@Override
public byte getModeType() {
return VIEW_CHANGE_END;
}
@Override
public boolean isZoom() {
return false;
}
@Override
public void dispose() {
}
});
}
desired image as: public void callBack(Bitmap bitmap) { saveBitmapToFile(bitmap); }
How to make the result return a bitmap list, I tried to fix it but my level does not allow me to complete this yet. Hope you can update it in the future. Thank you for the great project
The text was updated successfully, but these errors were encountered:
What I mean is that it will return a bitmap list, with each item in this list being each page of the word or pptx file. Currently, it only returns a single page when it is displayed, and initialized.
Hey man, can I ask you something, let's say I have a docx file, with 3 pages, how can I output each page as a bitmap or image (returns a list of bitmaps? ). With your code given:
desired image as:
public void callBack(Bitmap bitmap) { saveBitmapToFile(bitmap); }
How to make the result return a bitmap list, I tried to fix it but my level does not allow me to complete this yet. Hope you can update it in the future. Thank you for the great project
The text was updated successfully, but these errors were encountered: