ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 How to assign a IEBitmap as background to every page of a PDF?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

BBriefs

Germany
4 Posts

Posted - Jan 23 2025 :  08:33:12  Show Profile  Reply
Hello,

I am currently trying to implement a functionality that allows adding letter paper to an already existing PDF.

Technically this means that I want to select a picture of some kind and assign it as background to every page of the existing PDF.

I've had some difficulties achieving this with other PDF-components, such as all the layers being turned into one image thereby causing the PDF size to explode, which is why I would like to attempt this with Imageen but after experimenting around a bit I am not exactly sure how I should properly do this. Would I do some kind of canvas drawing with transparency or utilize layers maybe, or the PDFBuilder even though the PDF already exists?

I didn't find my exact problem in this forum or the demos, which is why I would be thankful if you could give me hint as to how this should be properly done with Imageen, or maybe I've overlooked something, which you could point me to.

xequte

38754 Posts

Posted - Jan 23 2025 :  14:41:32  Show Profile  Reply
Hi

So the method to do with with ImageEn would be to use a PDFViewer (hidden or visible) to load the page, add an image to it and save the page.

Please see the demo:

\Demos\PDF\PDFPageObjects\PDFPageObjects.dpr
PDF Page Objects Demo EXE

But:
- PDFium does not provide a method to change the z-order of objects (and you would need the image to be behind all the other objects). Email us for a workaround method to do this
- Adding an image to every page of a PDF is definitely going to make it much larger

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: