A PDF file can be any length, contain any number of fonts and images and is designed to enable the creation and transfer of printer-ready output. Actions: PDF Converter View other document file.
Zip File To Pdf Converter Online Gratis PAGES.ZIP to PDF - Convert file now View other document file formats: Technical Details: Official file format specifications for iWork '05-'08 Keynote files are not published by Apple but there have been attempts by some developers to reverse engineer them. When source files must be converted multiple times, conversion performance can be increased by uploading files once and converting it multiple times without uploading it again. The uploaded file will be stored in convertapi.com server for maximum period of 3 hours and will be accessible by secret URL with UUID. Our document conversion allows developers to convert most commonly used formats using a very simple API. With the highest quality output, we preserve the text, vector graphics, hyperlinks, colors and fonts with high fidelity. PDFTron SDK benefits include: Direct conversion from PDF to XPS and XPS to PDF. The high-quality conversion maintains.
Hi,I have a byteArray which is a docx. I'm trying to convert it to pdf and add it to the Response object so the user can download it or open it.
I've tried this which the pdf is corrupted
'docArray is the byte file from the db
Try
Dim doc As Spire.Doc.Document = New Spire.Doc.Document()
Dim oFileStream As System.IO.FileStream
oFileStream = New System.IO.FileStream(strTempName, System.IO.FileMode.Create)
'Write file to stream
oFileStream.Write(docArray, 0, docArray.Length - 1)
Convert Octet-stream To Pdf File
'Add docx to streamdoc.LoadFromStream(oFileStream, Spire.Doc.FileFormat.Docx)
'Covert docx to PDF
doc.SaveToStream(oFileStream, Spire.Doc.FileFormat.PDF)
Dim streamLength As Integer = Convert.ToInt32(oFileStream.Length)
Dim fileData As Byte() = New Byte(streamLength) {}
' Read the file into a byte array
oFileStream.Read(fileData, 0, streamLength)
oFileStream.Close()
strTempName = strTempName.Substring(0, strTempName.IndexOf('.'))
Context.Response.Clear()
Context.Response.AddHeader('Content-Disposition', 'inline;attachment; filename='' & strTempName & '.pdf' & '')
Context.Response.AddHeader('Content-Length', fileData.Length.ToString())
Context.Response.ContentType = 'application/octet-stream'
Context.Response.BinaryWrite(fileData)
Context.Response.Flush()
Catch ex As Exception
Context.Response.ContentType = 'text/plain'
Context.Response.Write(ex.Message)
Finally
Context.Response.[End]()
End Try
And this gives me errors...
Using ms As Stream = New MemoryStream(docArray, True)
ms.Write(docArray, 0, docArray.Length)
doc.SaveToStream(ms, Spire.Doc.FileFormat.PDF)
Please help.
Thanks,