Open byteshiva opened 3 years ago
Hi there! Unfortunately wasm-pdf doesn't have that capability. Microsoft has this tool but it's written in Python.
Hi there! Unfortunately wasm-pdf doesn't have that capability. Microsoft has this tool but it's written in Python.
Thanks,
I converted a Docx file to JSON using simplify_docx
, but it's not conforming to the JSON structure defined in wasm-pdf? Am I missing something here?
The conversion of Docx to JSON using simplify-docx
gave the below structure.
{
"TYPE": "document",
"VALUE": [
{
"TYPE": "body",
"VALUE": [
{
"TYPE": "table",
"VALUE": [
{
"TYPE": "table-row",
"VALUE": [
{
"TYPE": "table-cell",
"VALUE": [
{
"TYPE": "paragraph",
"VALUE": [
{
"TYPE": "text",
"VALUE": "sample text1"
}
]
}
]
},
{
"TYPE": "table-cell",
"VALUE": [
{
"TYPE": "paragraph",
"VALUE": [
{
"TYPE": "text",
"VALUE": "Mobile:"
}
]
}
]
},
{
"TYPE": "table-cell",
"VALUE": [
{
"TYPE": "paragraph",
"VALUE": [
{
"TYPE": "text",
"VALUE": " 1111111111"
}
]
}
]
}
]
},
Yes, you'll have to process this JSON data into a format that works with wasm-pdf. This you can do with JavaScript, take a look at the examples.
Yes, you'll have to process this JSON data into a format that works with wasm-pdf. This you can do with JavaScript, take a look at the examples.
Thanks, I'll try converting to format that works that with wasm-pdf.
I have some Word DOC files from which I'd like to generate Pdf on the client side. Is it possible to generate the JSON as per the wasm-pdf structure?