I’m working on a project where I need to extract images from a PDF layout that was originally exported from AutoCAD. The layout contains detailed drawings, specifically of solar modules, and I need these images in either PNG or JPG format. Every time I try it, the polygons, in this case representing solar modules, changes or set its lineweight.
I have try several ways and libraries (PyMuPDF, OpenCV, PIL, Pdf2image). Despite trying different approaches and libraries, I haven’t found a solution that maintains the original appearance of the lineweights as they are in the AutoCAD-exported PDF.
You can download the PDF from this link: https://mega.nz/file/sx9XlSCQ#8Rj0qW5phaKkExvznX-RFGd4ySj4bp4kGOg6ZVF9aYU
This is the result I’m getting: (Tiny lineweight)
This is the expected result: (Strong lineweight)
My question is:
Is there a method or specific library that can accurately extract images from PDF layouts exported from AutoCAD while preserving the original appearance of the elements? Alternatively, is there a known workaround for this specific issue?