🟥 [FREE] PDF Page To Image

PdfPageToImage


Converts a selected page from pdf to a jpg image file.

Cobbled together quickly from a couple of bits of code here and there in my other extensions, to fulfil a need...

:memo: Specifications


Version: 2.0 - bugfix: removing black outline/background from generated image
Released: 2025-05-22T23:00:00Z
Latest Update: 2025-05-27T23:00:00Z
Built & documented using: FAST v3.3.0

Blocks

MakeImageFromPdfPage

Convert one page of a pdf to a JPG image. quality (pdf) = 1-10. Use full or absolute paths to files.
MakeImageFromPdfPage_Method

AfterPdfPageConvertedToImage

Called after the image is converted. Provides file path, and output size, in bytes.
AfterPdfPageConvertedToImage_Event

AIX

PdfPageToImage

Example

pdftoimage.aia (63.2 KB)

Screen (The text in the image is actually crystal clear, just rubbish in the image component)

Example Blocks

Enjoy :smiley: , and all feedback and comments welcome.

Available for use in any MIT AppInventor projects or competitions

#####################################################################
This work by TIMAI2 is licensed under a
Creative Commons Attribution-ShareAlike 4.0 Unported License with attribution.
Please use name = TIMAI2 and link to this source page when giving credit.
#####################################################################

  • I note a similar extension exists HERE
9 Likes

I think, this is also similar. :thinking::thinking:

2 Likes

Thank for making this on my request! You get a like+Share. :grin:

@TIMAI2 It does not work on companion.

Example

Example

You need to restart your companion app and your AI2, then try again.

Working just fine here, even in my emulator (genymotion)

1 Like

There is a bug where I get a black outline And if the image is to big it does not fit the entire image.


You could add Length and width parameters...

Provide examples of your pdfs

Example.pdf (5.4 KB)

Possibly could use: [FREE] Image Cropper Extension: Crop image in fixed and free ratio
Make some edits and crop out the black. :question:

Can't find any solutions for mishapen pages.

Are you able to make the black lines become white? That would be helpful at least. Not perfect though.

No, I cannot see a way.

Perhaps try one of the other two solutions linked above ?

@JunkoJoseph

Update Version 2

Got rid of the black bars/outline!

PdfPageToImage

2 Likes

Thanks :smile:

you get another :heart:

Is there still an issue with this ?

Yes. But i currently don't require images of that size. But i see that other people are clicking on the link so it would be useful to change.

example?

:open_mouth: I was just grabbing the file, I was just zoomed weird. Here's a working file:

That is an image not a pdf, or is that the output from the extension, in which case there is no issue ?