Skip to content

Converting PDFs to PNGs #2

Description

@jjhelfman

The following code outputs extremely faint png files for the pdf files I am using:

from __future__ import print_function
from wand.image import Image

with Image(filename='source.pdf') as img:
    with img.convert('png') as converted:
        converted.save(filename='pyout/page.png')

I tried experimenting with export_pixels() method but still did not get my PNG output as desired. For now, I will be converting to JPEG since the wand module seems to work well for those.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions