Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1

TOPIC:

How to set the custom PDF Text/Background Colour 9 years 7 months ago #7120

  • viveksoneja
  • viveksoneja's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 3
  • Thank you received: 0
Hi,

I would like to complete theme the PDF's, by setting the custom background and text colour. For example: I would like to render PDF's with blue background and white text, and images being same. Is it possible with current library, if not, can you please provide the support for same?

Also, in dark mode, all the images are getting inverted, we would like to keep the images as of same colour and change the background and text color only, it is possible to achieve the same with current library?

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

How to set the custom PDF Text/Background Colour 9 years 7 months ago #7122

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
to set background of page you can try:
Bitmap bmp = Bitmap.create...
bmp.erase(0xFF0000FF);
Page.RenderToBmp(bmp,...);

this depends on contents of page, which not fill whole page.

text color can't be set, color values are set in page content stream(command stream).

dark mode: no ideas.

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

  • Page:
  • 1
Powered by Kunena Forum