Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - 5 ImageFiles to one PDF
  FAQ FAQ  Forum Search   Register Register  Login Login

5 ImageFiles to one PDF

 Post Reply Post Reply
Author
Message
luet View Drop Down
Team Player
Team Player
Avatar

Joined: 09 Aug 16
Location: Germany
Status: Offline
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote luet Quote  Post ReplyReply Direct Link To This Post Topic: 5 ImageFiles to one PDF
    Posted: 06 Nov 16 at 10:37PM
Hi,

Is it possible to convert 5 image files (JPG) into a new PDF file (only one PDF)?
Thanks for help and a few lines of code

luet
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 06 Nov 16 at 10:40PM
Hi Luet,

i think you don't know that there are online resources with kb-articles, online reference and so on.
Simply go on the official support pages to check this out.
The developer guide you've got with installation, too.
QP offers functionalities to render each iamge into a pdf-page and putting these pdf-pages into one new pdf.

Cheers,
Ingo

Back to Top
luet View Drop Down
Team Player
Team Player
Avatar

Joined: 09 Aug 16
Location: Germany
Status: Offline
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote luet Quote  Post ReplyReply Direct Link To This Post Posted: 07 Nov 16 at 7:33AM
This is known to me.
But I would like to bring 5 pictures into a single PDF.
There is no article, example or hint.
Nowhere...

thanks Ingo
Back to Top
luet View Drop Down
Team Player
Team Player
Avatar

Joined: 09 Aug 16
Location: Germany
Status: Offline
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote luet Quote  Post ReplyReply Direct Link To This Post Posted: 07 Nov 16 at 9:27AM
Thanks Ingo, that you are there for this forum.
That's great.
But there are just too few examples in the Developer Guide, kb-articles and in the online reference.
This is a real shortcoming, so I ask here in the forum.

But I have now developed a solution and everything is going well now.
thank youSmile
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 07 Nov 16 at 7:52PM
Hi Luet,

it's often like this.
People asking for help...
and if they are ready there isn't the time to post a sample into the samples section.
That's why there are less samples :(

Cheers,
Ingo

Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 07 Nov 16 at 8:02PM
I think you don't know how to search?

Take an empty pdf or create an initial one with an empty page and then use this sample:
http://www.debenu.com/kb/add-images-pdf-programmatically/
It won't feed your needs in detail but you can modificate it.

Here's an easy sample dealing with one image but you can put the code into a loop gathering more images:
http://www.debenu.com/kb/convert-an-image-to-a-pdf-programmatically/

Here's an aditional thread giving you an idea what's possible with QuickPDF:
http://www.quickpdf.org/forum/add-300dpi-image-to-pdf_topic2564.html

I've searched for these three ressources from here:
http://www.debenu.com/docs/pdf_library_reference/Search.php
...with the search string "image to pdf".

Cheers,
Ingo

Back to Top
luet View Drop Down
Team Player
Team Player
Avatar

Joined: 09 Aug 16
Location: Germany
Status: Offline
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote luet Quote  Post ReplyReply Direct Link To This Post Posted: 08 Nov 16 at 12:45PM
Hello,
But I know how I must look.
But you did not quite understand me.
The question was not how do I get from one picture to one PDF file.
But how do I get more than one picture (5 pictures) in a PDF file!
And there is still no example of this.
By trying, I managed to find the solution, which was very easy afterwards.
Here is my code:

For n = 1 to Filecount

         exten = LCase(Mid(Datei (n), InStrRev(Datei(n), ".")))
        If (GetAttrW(path& Datei(n)) And vbDirectory) = vbDirectory Then

         ElseIf InStr(".jpg.jpeg.jpe.jfif.gif.tif.tiff.png.wmf.bmp.emf", exten) > 0  Then
          Nummer = Nummer + 1

            If Nummer = 1 Then
            DocID1 = QPdf.NewDocument()
             End If

            QPdf.AddImageFromFile path & Datei(n), 0
            lWidth = QPdf.ImageWidth() * size
            lHeight = QPdf.ImageHeight() * size
            QPdf.SetPageDimensions lWidth, lHeight
            QPdf.DrawImage 0, lHeight, lWidth, lHeight '// Store the updated PDF where you like
      
            QPdf.NewPage
        End If
    Next
    QPdf.DeletePages QPdf.PageCount, 1

              lRet = QPdf.SaveToFile(NewFilename)
         

Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 08 Nov 16 at 9:34PM
I did understand you ...
I've written "...Here's an easy sample dealing with one image but you can put the code into a loop gathering more images:...".
And i see that you've done it with success ;-)

At a second step you can check if tiff-files have more than one image inside and render each of it on a separate pdf-page...

Cheers,
Ingo

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store