Hi everyone, new user here.
I'm looking to create multiple projects that use the same PDF template, but I would like to show a different image on the cover page for each project depending on which Custom Build variable is selected. Is there a way to do this without having a template for each project?
Any help would be appreciated
Thanks
Conditional PDF cover page image
Moderators: Alexander Halser, Tim Green
- Tim Green
- Site Admin
- Posts: 23181
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Re: Conditional PDF cover page image
Hi James and welcome to the forum!
Yes, what you can do is create a snippet file containing your cover page image in each project with exactly the same name, and then insert this as a topic snippet in the template. The image will then get sourced from the project you are using to publish the PDF:James Swift wrote:I'm looking to create multiple projects that use the same PDF template, but I would like to show a different image on the cover page for each project depending on which Custom Build variable is selected. Is there a way to do this without having a template for each project?
- In your project, look in the Project Explorer on the left and navigate down to Project Files > Topic Files. Create a Topic file there with a simple name, like cover_image or something like that.
- Right-click on the new topic in the list on the left, select Include in Builds in the context menu and disable the ALL build option and activate the one for PDF. (When you are making a snippet for HTML you need to disable all build options, including HTML)
- Insert your cover image and any cover texts you'd like to have in the topic. Click on the gear icon in the top left corner of the editor window and turn off the topic's header.
- In the Manual Designer for the PDF template, select the cover page section, click and drag where you want to insert the image and then select Insert Text Snippet in the Insert menu. Choose the from topic option and enter the ID of the topic file you created in the steps above. Then you can adjust the size of the box that will contain it (you may need to check and re-adjust after publishing the PDF).
Regards,
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.