Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Here you should submit your bug reports with logcat.

TOPIC:

Android PDF lib not working on some tablets 6 years 5 months ago #6739

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1023
  • Karma: 43
  • Thank you received: 56
try these codes add to activity which PDF pages displayed:
@Override
public void onAttachedToWindow() {
super.onAttachedToWindow();
getWindow().setFormat(PixelFormat.RGBA_8888);
}
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
lp.copyFrom(getWindow().getAttributes());
lp.format = PixelFormat.RGBA_8888;
getWindow().setAttributes(lp);
Global.Init( this );
...
}

Please Log in or Create an account to join the conversation.

Last edit: by .

Android PDF lib not working on some tablets 6 years 5 months ago #6740

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1023
  • Karma: 43
  • Thank you received: 56
and SDK can only works under ARGB_8888 Bitmap object.
maybe the Bitmap object is not ARGB_8888, even you pass Config.ARGB_8888.

Please Log in or Create an account to join the conversation.

Android PDF lib not working on some tablets 6 years 5 months ago #6741

  • ffvanderlaan2
  • ffvanderlaan2's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 10
  • Karma: 1
  • Thank you received: 0
I added your code, did not help.
You might be right, but how can I check this? targetBitmap.getConfig() prints ARGB_8888. The device has Android 4.2.2

Please Log in or Create an account to join the conversation.

Last edit: by Rignanese.

Android PDF lib not working on some tablets 6 years 5 months ago #6742

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1023
  • Karma: 43
  • Thank you received: 56
plz test temporary library as link:
www.radaee.com/libs.rar
this library shall print logs like:
"JNI" "Need ANDROID_BITMAP_FORMAT_RGBA_8888, Bitmap Fotmat:ANDROID_BITMAP_FORMAT_RGB_565"


i'm waiting...

Please Log in or Create an account to join the conversation.

Last edit: by .

Android PDF lib not working on some tablets 6 years 5 months ago #6743

  • ffvanderlaan2
  • ffvanderlaan2's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 10
  • Karma: 1
  • Thank you received: 0
Hi,

I already removed your code again, without it it prints:

D/JNI(7312): Need ANDROID_BITMAP_FORMAT_RGBA_8888, Bitmap Fotmat:ANDROID_BITMAP_FORMAT_NONE

Please Log in or Create an account to join the conversation.

Android PDF lib not working on some tablets 6 years 5 months ago #6744

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1023
  • Karma: 43
  • Thank you received: 56
OK, i'll modify codes, and test it again.

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum