Viewing 10 posts - 1 through 10 (of 18 total)
  • Author
    Posts
  • #9806 Reply

    Joachim

    I use drawPage to get Bitmap from a Pdf and use it in an ImageView. There are transparent images in the pdf, but when I add the bitmap to the Imageview, I got a white background (instead of transparent). It is possible to do this with transparency? Or can this be an extra parameter in the drawPage function?

    Thanks for the info!

    #10069 Reply

    Dr. Plug
    Moderator

    Hello, Joachim

    Thank you for the inquiry.
    But actually, I can’t fully understand a situation you have.
    So could you give us a PDF file that problem happens?
    If you give us a file, it would be very helpful to resolve that problem.

    Best Regards,
    Dr.Plug

    • This reply was modified 1 year, 2 months ago by  Dr. Plug.
    #10074 Reply

    Pieter Claerhout

    Hi Dr.Plug,

    let me join in here (Joachim is one of the developers at Twixl media).

    What we want to be able to do with the PlugPDF toolkit is to convert PDF pages to images.

    Have a look at the following PDF file:

    http://europe.content.twixlmedia.com/twixl-customers/landscape_1_s0_s1_full.pdf

    The resulting image we want to get is the following:

    http://europe.content.twixlmedia.com/twixl-customers/landscape_1_s0_s1_full.png

    From what we can see, most PDF rendering engines by default use a white background to draw the PDF content on. In the PDF itself, there is no background color defined.

    Any chance you can make that work?

    Kind regards,

    pieter


    pieter@twixlmedia.com
    http://twixlmedia.com

    • This reply was modified 1 year, 2 months ago by  Dr. Plug.
    #10137 Reply

    Dr. Plug
    Moderator

    Hello, Joachim

    Thank you for the inquiry with a detail explanation.
    We’ll check that possibility as soon as possible. So could you wait for a few seconds?
    And I have a small question. Do you want to use that feature in both Android and iOS?

    Best Regards,
    Dr.Plug

    #10138 Reply

    Pieter Claerhout

    Hi Dr. Plug,

    we would need this for Android.

    Kind regards,

    pieter


    pieter@twixlmedia.com
    http://twixlmedia.com

    #10148 Reply

    Pieter Claerhout

    Hi,

    Any update on this?

    Kind regards,

    Pieter

    #10153 Reply

    Dr. Plug
    Moderator

    Hello, Joachim

    Thank you for the waiting.
    We checked our core part. But unfortunately, it is hard to make a white background to transparent ones.
    But if you use this code, you can get a Image which background is transparent.
    (refer this link. http://stackoverflow.com/questions/12396236/ios-change-the-colors-of-a-uiimage)

    And about the new display mode, we are making them.

    Best Regards,
    Dr.Plug

    • This reply was modified 1 year, 2 months ago by  Dr. Plug.
    #10158 Reply

    Pieter Claerhout

    Hi,

    this unfortunately doesn’t seem to be a solution as this will change all white elements in the PDF.

    Isn’t there an option in the Android part like you have in iOS when using CoreGraphics? When you draw a PDF with CoreGraphics on an iOS device, the first thing that happens is that it fills the canvas with white (or with any color you like). On top of that, the actual PDF page content is drawn.

    In the PDF itself, there is no white background, every reader just assumes it’s white. It can’t be that hard I guess to leave out the step of filling the image with white?

    Just for my curiousity, is the PDF drawing itself happening in the Android code or in the native code?

    Kind regards,

    Pieter

    pieter@twixlmedia.com
    http://twixlmedia.com

    #10177 Reply

    Dr. Plug
    Moderator

    Hello, Joachim

    Thank you for the feedback.
    Actually PDF drawing happens at our native core part. so it is hard to change that code.
    But we found the way to draw a transparent background. and we’ll overload a drawPage which is in PDFDocument.
    This is an example.

    if you set a enableTransparent to true, you will get a image file from the parameter path.
    Only thing you should keep in mind is extension should be .png.
    We’ll make that feature by next Wednesday. so could you wait for a few days?

    Best Regards,
    Dr.Plug

    • This reply was modified 1 year, 2 months ago by  Dr. Plug.
    #10179 Reply

    Pieter Claerhout

    Hi,

    that’s great news. If we also have this by the end of the month, that would be great.

    As soon as we can verify that this is working (as well as the 2 up layout without page curl), we’ll order a license for the Android unlimited.

    Kind regards,

    pieter

    pieter@twixlmedia.com
    http://twixlmedia.com

Viewing 10 posts - 1 through 10 (of 18 total)
Reply To: PDFDocument.drawPage (Android)
Your information: