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!
![]() |
5 ImageFiles to one PDF |
Post Reply ![]() |
Author | |
luet ![]() Team Player ![]() ![]() Joined: 09 Aug 16 Location: Germany Status: Offline Points: 41 |
![]() ![]() ![]() ![]() ![]() 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 |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
luet ![]() Team Player ![]() ![]() Joined: 09 Aug 16 Location: Germany Status: Offline Points: 41 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
luet ![]() Team Player ![]() ![]() Joined: 09 Aug 16 Location: Germany Status: Offline Points: 41 |
![]() ![]() ![]() ![]() ![]() |
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 you ![]() |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
luet ![]() Team Player ![]() ![]() Joined: 09 Aug 16 Location: Germany Status: Offline Points: 41 |
![]() ![]() ![]() ![]() ![]() |
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) |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store