Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Fri Oct 15, 2021 2:22 pm

I have a source PDF with 4 layers, 2 are visible, 2 are not.

When I create a template from this page and insert it into another PDF the layers are flattened and all content is visible.

Is there a way to create a template and keep the layers so when the template is inserted into another PDF the layers are copied as well and invisible layers remain invisible?

emaginationstore
 
Posts: 15
Joined: Mon Sep 25, 2017 2:02 pm

Mon Oct 18, 2021 8:44 am

Hello,

Thanks for your inquiry.
The layers belong to the page content, and our product creates all of page content when creating a template. Sorry there is no way to make layers properties keep same as original(no flattened and invisible) when creating a template from a PDF layers page. As a workaround, you can fisrtly split your layers PDF and then merge it to your another PDF. If there is still any issue, please share us with your input PDF files as well as your desired output effect for reference, you could attach them here or send them to us via email (support@e-iceblue.com), then we will further look into it.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Thu Oct 21, 2021 8:16 am

Hello,

Greetings from E-iceblue.
Did the workaround help you? Thanks in advance for your feedback and time.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Wed Oct 27, 2021 8:13 am

Hi,

Thanks for your feedback. I didn't want to do it by merging because the files are a lot larger and the process takes longer. The output files I'm creating are a combination of 100 copies of a page in pdf 1, 250 copies of a page in pdf 2, 50 copies of a page in pdf 3, etc. So by using template pages the output PDF remained around the same size as the input pages.

My resolution will be to remove the content on the hidden layers before using templates. Its not ideal as I'd rather have kept the hidden layers but they are not necessary for this project.

Thank you.

emaginationstore
 
Posts: 15
Joined: Mon Sep 25, 2017 2:02 pm

Wed Oct 27, 2021 9:07 am

Hello,

Sorry, at present the internal processing mechanism of creating template just copied and created all of page content, the internal control data(E.g. flattened, invisible...) of layers will not be copied and created. If there are any improvements in the future, we will let you know. Thanks for your understanding.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Return to Spire.PDF