Change Document Restrictions - itext

I am using iText to fill out PDF AcroForms. The original form has a Security Method of No Security, but Changing the Document and Document Assembly are Not Allowed. After I fill (and flatten) the document, the resulting PDF still has the same document restrictions as the original form. Is there a way to allow document assembly in the filled in PDF? I have tried to adjust the WriterProperties, using the EncryptionConstants.ALLOW_ASSEMBLY, but that was not succesfull.

Related

Can you include multiple labels in the same PDF using shippo.transaction.create({...})

I am creating a new transaction object and purchasing the shipping label with one API call using shippo.transaction.create({...}). My user can request 1 or more of the same label at the same time. How can I include the number of labels they requested in the same PDF? I really don't want to do it in a batch since this is much quicker and straight-forward.
I have tried looping through
shippo.transaction.create(
{
shipment: shipment,
carrier_account: carrierAccount.object_id,
servicelevel_token: shipDetails.shippingMethod,
label_file_type: 'PDF',
})
but only ever get 1 back in return. This PDF will be either emailed or printed directly by the user.
As far as I understand, we don't have an option to download/aggregate multiple labels into one PDF file via API/SDK.
Batch API can be used to group the purchased labels. This API will aggregate the label into one single PDF as well.
Once your purchases are complete, you will be able to download a
merged PDF file with the labels. Each PDF file will contain up to 100
labels, the label_url field will contain an array of PDF files.
You can read about this further here: https://goshippo.com/docs/batch/
I am checking with my team as well. I will edit/add a comment if I find a workaround or an alternate solution.

Marklogic DHF5:- Can we return multiple content for one document in main.sjs

We are migrating from MarkLogic DHF4 to DHF5 (Data Hub Framework)
We are having scenario where for one entity, depending on criteria we need to create more than one harmonize document for a single input document. This scenario was possible in legacy flow where we used to call write:write method.
But in DHF5 implementation we are supposed to return only one content for one input document getting processed in main module main.sjs.
Is there a way where we can create multiple harmonize document as required from one input document in DHF5?
We expect that one input document should be able to create more than one harmonized document in single step(in main.sjs)
Your custom module is expected to return a Content object or an array of them. Each Content object must have uri, value, and context properties and may also specify provenance.
Based on this, your one input can be turned into multiple outputs.
See the "Required Outputs" section on this page for more details.
Your module must return the following:
For a Custom-Ingestion step, a Content object.
For all other custom steps, a Content object or an array of Content objects.

Posts, tags and mongoose in Express JS - or any other language for that matter

I'm trying to figure out the best approach for tagging posts in my express application. There are two types of post, say 'Phones' and 'Tablets'. They both can share tags but require different Models to access them (this wont change).
I opened up Wordpress to see how it handles tags, but there is a lot of replica data in the DB and I don't feel this is right for my application.
Should I store tags as a String with a delimiter and query it within the post? Or should I create a new table for those tags that has a post ID associated with the list of tags so that when I search I only have to search that given table, rather than two different ones?
Thanks
As long as document will not exceed 16MB I will keep tags inside a document as an array field.
Then I will create an index on tags field - to have an easy way to display documents containing specific tag (mongo will index all array entries and provide fast search).

Where does Tridion store Metadata values?

When we define custom metadata for the components, it is my understanding that this user-given metadata is stored in SQL server. And it is not visible in the component xml. Can anyone explain how exactly a metadata linked to a component will actually get stored?
A Component definition in Tridion has two types of fields: Content fields and Metadata fields. Both field types are stored in the Content Manager database (either SQL Server or Oracle). And both field types are retrieved whenever you read the Component back from Tridion through any of its APIs (TOM, TOM.NET or Core Service).
Only the Content fields are shown in the Source tab of a Component edit window, but the Metadata fields are visible on the Metadata tab of that same window.
If you want to have a single view of the XML of both Metadata and Content fields (as well as many other properties of you Component in Tridion), consider installing the PowerTools or the Item XML extension.
I think you may be confusing things a bit.
The Metadata is always stored as part of the component - under tcm:Metadata. When you publish this component, then the metadata fields will also be available for querying on the Content Delivery Data Store.
Whether these fields get displayed as part of the component presentation depends on your templates. There's nothing stopping you from including these values in the output of your template (typical use case for SEO, for instance).
In summary:
In the CM, the Metadata is stored together with the Component
In the CD, the Metadata is stored as part of the "CUSTOM_META"
associated with this component.
Just a note,
There is another metadata that is not stored as metadata fields, which is the system metadata, such as Last Modified Date or the user that last modified the component. That's metadata in the CMS. Also there is system metadata in the front-end (broker or file system metadata) that gets published when you publish a given component, such as Last Published Date.
You can leverage/use the system metadata in your templates as well.

Where is the Word 2007 schema library stored?

Word 2007 allows XML schemas to be attached to a document (under the Developer toolbar | XML group | Schema button). Where is this schema library information stored?
I have documents that I have created with custom XML tags based on a schema but when I pass on the document and the schema to someone else the schema is marked as unavailable, presumably because the file location of the schema is different.
Is there some way to edit this information to change the path to a given schema?
It's not stored with the docx, just the path to it is stored. So passing a document around will almost always break the link. VSTO can get around this by embedding the XSD as a resource in the app.
But for VBA, it's trickier - you need to have a path you can rely on on each user's computer and then deploy your XSD there. One way is to synch the Document_Open (or just use the AutoOpen) event so that when a user opens the document (warning: macro security needs to be dinked around with), you can simply "write" your XSD that is hard-coded as a string in code-behind and then write it to a file and then attach that file with a routine like:
Dim objSchema As XMLNamespace
Set objSchema = Application.XMLNamespaces.Add("c:\something\mynewlycreated.xsd")
objSchema.AttachToDocument ActiveDocument
So as you're not leaving behind artifacts, you could then delete that XSD from the user's computer on Document_Close or AutoClose.