How to manipulate the low level objects in PDF?

I have several OCGs in my PDF file, but I don’t know how to set its ViewState to OFF so that it’s disabled by default. I also don’t know how to lock the OCGs. I want to achieve this by manipulating the low level PDF. How do I do this with the library?

@compagniedsdr

Can you please share your sample source and expected output PDF documents for our reference? We will log an investigation ticket and share the ID with you as we need to check the feasibility of this feature.

I don’t have any expected output. But when you create the document, you can enable or disable layers by default. So far, the layers I created with Aspose are all enabled by default. I want to disable them by default.

@compagniedsdr

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFNET-57005

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

To disable the ViewState of your OCGs and lock them within your PDF file using low-level PDF manipulation, you’ll need to access the OCG properties and set the appropriate flags. This typically involves using a library that provides access to the internal structure of a PDF document, allowing you to modify its objects directly. Check the documentation of your chosen library for methods related to OCG manipulation, such as setting ViewState to OFF and locking the OCGs to achieve your desired functionality.

@lokas

We have already created an investigation ticket in our issue management system for this feature. We will inform in this forum thread once the ticket is resolved.

1 Like