Taifun's PDF Viewer Extension Transparent Background Rendering

Hello,

This post is for PDF Viewer that was created by @Taifun

I am having a problem with rendering PDF files. All rendered PDF files have a transparent background. Is there any way to let the background of rendered files to be white or a color that I can choose?

I forgot to mention that this happens when the rendered file is PNG. Any option to have white background for PNG?

Did you try changing the render mode to print instead of default?

How did you even notice this? What does it look like when you open a PDF created with this extension?

I don’t think there is and option to render as .png

Yes I did

You can change the “RenderedFilename” extension to be a PNG instead of JPG…

I just came to know that even JPG has the same issue. If you check the rendered files, you’d notice that it has a black background.

I haven’t used this extension, I was just trying to help find the source of the problem.

Best of luck with your app.

1 Like

You’re fine bro. Thanks for the help :slight_smile:

can you provide an example pdf file, so I can take a look at this issue?

Taifun
PS: the extension can render png and jpg files

Here is an example of the PDF and the rendered files:

PDF:

JPG:

thank you, I will look at it as soon as possible… be patient meanwhile…
Taifun

2 Likes

Alright. Thanks!

I now uploaded your pdf file into the assets of the example app and the result looks fine, see screenshot…
you might want to use the example app together with your pdf file to verify…
note: the example app uses a webviewer to display the rendered image…
Taifun

Yes I know. It works if you put the pdf in the webviewer. But if you check the rendered png file in your phone, its black!

@Mika, does your image editor extension offer a method to set the transparent color of a png image?

Taifun

you can see all the methods here:

There doesn’t seem to be an option to adjust the alpha values.

I now added a new property HasAlpha into the pdf extension. You can set it to true and the extension will convert a transparent background into white.

hasAlpha

Taifun

3 Likes

Hey Guys, Can Anyone Help Me?
I am building an app which opens a pdf file stored on google drive. but the file is not opening in my app and the same file is opening in taifun pdf aia file app. the file is piblic on google drive. but it is still not opening in my app’s web viewer. What should i do?

well, it looks like you have some kind of bug in your blocks…
what about comparing your blocks to the blocks of the example app`?
you might want to provide a screenshot of your relevant blocks
Taifun
PS: please do NOT post your aia file, thank you.

hello i just bought the pdf extension with paypal but i did not send the extension and i need to thank you