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!
![]() |
Merge PDFs with background images |
Post Reply ![]() |
Author | |
Franco ![]() Beginner ![]() Joined: 15 Mar 18 Status: Offline Points: 5 |
![]() ![]() ![]() ![]() ![]() Posted: 15 Mar 18 at 3:13PM |
Hi,
done a job with merging many PDF docs together to a single new PDF. All works fine. The PDFs are containing formatted text and a few vector objects like rectangles or cyrcles. Now I have to insert background images in the new main document, each merged PDF with an own jpg image as background. The text and vectors of the different merged files should naturally be in front of the background images within the new main document. After drawing the image in the new document and then merging, the white background of the merged PDF overlapped the image, so there is a white rectangle (media box) over the image. Is there a way to remove the white background of the PDFs before merging, so that only the text and vector objects are moved to the new document ? Other recommendations ? Thanks for any advice. Frank |
|
![]() |
|
Franco ![]() Beginner ![]() Joined: 15 Mar 18 Status: Offline Points: 5 |
![]() ![]() ![]() ![]() ![]() |
Have seen something in the docs and will give the contentstreams a try.
After all pages are merged in the new page of the main, NewContentstream and place the background images there, then Movecontentstream to 1. |
|
![]() |
|
Franco ![]() Beginner ![]() Joined: 15 Mar 18 Status: Offline Points: 5 |
![]() ![]() ![]() ![]() ![]() |
Doesn't work, there are still white rectangles of the merged pdf over the background images.
Using Quick library11.15 with Clarion. Here the Code: QPL.ClearFileList('List1') Loop Zae = 1 to ... .... QPL.AddToFileList('List1', pathname-array) End DateiSumme = QPL.MergeFileList('List1', PDFDateinameNeu) ... If Not QPL.LoadFromFile(PDFDateinameNeu,'') Exit End !New page in new main document Akt_Seite += 1 QPL.InsertPages(Akt_Seite, 1) QPL.SelectPage(Akt_Seite) QPL.SetMeasurementUnits(1) QPL.SetOrigin(1) QPL.SetPageDimensions(BOG:Bogengroesse_X, BOG:Bogengoesse_Y) !capture single pdf for merging PDF_Seite += 1 QPL.SelectPage(PDF_Seite) QPL.SetMeasurementUnits(1) PDF_Hoehe = QPL.GetPageBox(1,3) PDF_Breite = QPL.GetPageBox(1,2) PDF_ID = QPL.CapturePage(PDF_Seite) .... !merging file x-times on one page of the new doc. QPL.SelectPage(Akt_Seite) QPL.DrawCapturedPage(PDF_ID, BOG:StartPosX, BOG:StartPosY, PDF_Breite, PDF_Hoehe) .... !draw background images HintergrundStream = QPL.NewContentStream() QPL.SelectContentStream(HintergrundStream) QPL.DrawImage(BauPosX, BauPosY, BAU:Bild_Breite, BAU:Bild_Hoehe) ... !Move Image Stream to 1 If HintergrundStream > 0 QPL.MoveContentStream(HintergrundStream, 1) HintergrundStream = 0 QPL.CombineContentStreams() End !PDF-Information QPL.SetInformation(0, '1.4') QPL.SetInformation(5, 'Demo Tools Franco') QPL.SetInformation(6, 'Demo-Manager xyz') !Save PDF QPL.SaveToFile(Clip(PDFDateinameNeu)) |
|
![]() |
|
Franco ![]() Beginner ![]() Joined: 15 Mar 18 Status: Offline Points: 5 |
![]() ![]() ![]() ![]() ![]() |
... there was indeed an unrecognizable white filled curve behind the Text surfacing the whole page!
Unbelievable. Thx ;-) |
|
![]() |
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