1. Zhang JX
  2. PowerBuilder
  3. Tuesday, 17 October 2023 10:10 AM UTC

Hi all,

We need insert a drawing from PDF file into an Excel file (serve as CoC with drawing).

is there a way to extract image from PDF into jpg within PB or SnapDev scripts?

 

Thank you.

Regards, JX

 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 17 October 2023 17:46 PM UTC
  2. PowerBuilder
  3. # 1

Hi Zhang;

  I just started working with this App a few weeks ago for PDF manipulation.

Its free & open source. I do not have a lot of experience with it yet but maybe, this can do what you need ...

https://www.pdfgear.com

HTH

Regards ... Chris

Comment
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Tuesday, 17 October 2023 10:23 AM UTC
  2. PowerBuilder
  3. # 2

Hi.

PB doesn't offer such a functionality. The only thing that you can extract currently (in PB 2022 R2) from PDF's is attachments. But you can use third party tools to do that.

1) As far as I Know Image Magick can do that... It's a command line tool, so it will be easy to use it. Google can help you (pdf generation - Convert PDF to PNG using ImageMagick - Stack Overflow).

2) Pdf Creator can do that. You must check licensing.

3) You can use iText (itextsharp) to manipulate any pdf. It has support for .net, I guess (but never tried) it can work with snapdevelop. You must check licensing.

In older versions of pdf creator (1.6.x+), there was a library called pdfforge.dll based on itextsharp that has an ExtractImages method. Pdfforge.dll is built to be used in .net, but is also com visible, so you can register it and directly call it from pb. Again you have to check licensing and I'm not sure if you can find those old versions on the net.

Andreas.

Comment
  1. Francisco Martinez @Appeon
  2. Tuesday, 17 October 2023 14:29 PM UTC
ImageMagick also has a .NET Wrapper: https://github.com/dlemstra/Magick.NET so there's that option as well



Regards - Francisco
  1. Helpful
  1. Zhang JX
  2. Tuesday, 17 October 2023 15:31 PM UTC
Thanks Andreas/Francisco.

will explore the possibility.

Regards, JX
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.