Adobe API to convert Office documents to PDF - pdf

Is there any API available by Adobe that would enable me to convert Office Documents (docx, xlsx, pptx, etc.) files to a PDF file format?
I would prefer to use .NET to do so, but if I have to I can resort to C/C++.
I've already tried using Adobe SDK, but it seems to me it works to automate the Acrobat application instead of giving me access to underlying functionality. If it's possible and anyone would care to give me an example, I'd be very thankful - after many hours googling it I was unable to find a good answer (a lot of samples doing the contrary, though - converting from PDF to Word).
One last thing, I need it to be an library from Adobe. So, PDFCreator, BCL EasyPDF, Aspose.Words/Cells/Slides etc., unfortunately, won't help me.
UPDATE 1:
I decided to ask this question in the forum because, first, I can't believe that Adobe wouldn't have a library to do this; Of course, it may be the case, but it's very strange.
UPDATE 2:
I also looked already into AdobePDFMakerX.Word interface. I tried calling the CreatePDF(string in, string out) interface, but to no avail. It always returns false, and there is no error description that I can use.

want to convert doc file to pdf file using Adobe pdf service api
In short it has two parts:
make a post request ( providing require parameters ) and from header take x-request-id
make a get request ( providing require parameters ) and as responce you will get your pdf documet
it is working fine

Are you sure Aspose.Words didn't work for you? I tested the below code sample and works fine.
string filePdf = #"D:\\Projects\\original.pdf";
string fileDocX = #"D:\\Projects\\New.docx";
Aspose.Words.Document doc = new Aspose.Words.Document(fileDocX);
doc.Save(filePdf, Aspose.Words.SaveFormat.Pdf);

Related

How do I reference a hosted docx rather sending every time when creating a pdf (document generation api)

I have asked this question on https://community.adobe.com/ and have not received an answer. If I do, I will include the response here.
I am able to create a pdf using the basic approach outlined by adobe at https://developer.adobe.com/document-services/docs/overview/document-generation-api/
Ideally, I don't want to have to send the base docx word document across in the api call each time I generate a new pdf. I would rather host the docx which can be retrieved at document generation time. One approach would be a reference url to a docx hosted on acrobat.adobe.com. At the moment I have to send the docx as well as the json data which seems inefficient.
I am using https://cpf-ue1.adobe.io/ops/:create
"cpf:inputs":{
"documentIn":{
"dc:format":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"cpf:location":"InputFile0"
},
I guess if it can't be done, then that's okay, I just would like to know so I can implement accordingly.
thank you

How to work with PDF in PDF/A1-a format using PHP

I'd like to generate a PDF file strictly in the PDF/A1-a format (to integrate with a government service).
This service does not support PDF/A1-b or PDF/A1-x format. Only PDF/A1-a.
Previously, I used mPDF (https://mpdf.github.io/) in my work. But this library supports maximum PDF/A1-b.
A search in Google gave no result. But I think that I am not the first one who needed this format. Please tell me if there is something convenient for working with this "rare" format (PDF/A1-a).
Regards, Alexey.

Windward Document Generation - PDF Copy Protected

In our application, we generate a few reports and documents through Windward. The documents are generated based on specific user conditions and the user is able to download the document.
As part of a new requirement, we would like to enable copy protection of the generated PDF -- basically, users would not be able to Copy the contents of the document.
Is there anyway we can achieve this through Windward? Or do we have to integrate with external third party software like LockLizard or Win2PDF?
We did think of converting the document to an image and recreating the PDF but this is unacceptable as the document formatting became off the mark.
Appreciate any insights or alternate solutions.
Thanks,
Aravind
Windward does this. If you're using the Java engine use the following calls (javadoc):
ProcessPdfAPI.setOwnerPassword()
ProcessPdfAPI.setUserPassword()
For the .NET engine use the following calls (api docs):
ReportPdf.OwnerPassword
ReportPdf.Security
ReportPdf.UserPassword
Is this what you need?

CFHTTP to get an embedded PDF for cfmail - mailparam

Ok, I am not sure about this and am hoping to get some insight. Somewhat of a philosophy more than code specific coding question. Is this realistic or do I need to do something very differently?
I want to embed a PDF in an email as described at Ray's blog Ray Camden Post
I am trying to get the PDF from the dynamic generator (existing code), NOT generating it on the page as described in Ray.
I have a url basically (http://blah.com/index.cfm?pdfId=490) (The real URL is private)
It works in a browser, I get a PDF that opens just fine in the browser.
When I try to open with CFHTTP I do not get any binary data.
<cfhttp url="#arguments.url#"
getasbinary="auto" method="get"
result="urlContent"></cfhttp>
"FileContent" (empty/null)
"Header" (HTTP/1.1 200 OK ...)
"mimetype" (text, not pdf)
"Status" (200)
Can someone explain to me what is occurring with the browser .... ie why do I not get a PDF (file/CFHTTP) when the general link works?
Should I force 'binary' (I expected auto would work)?
Does the browser issue a new request?
FYI I am running CF 9.0.2 (developer)
I think Leigh and Ray answered the question, or helped me solve the problem. While debugging, saving the results to disk (rather than looking at it in the debugger ...) was the key to finding my error.
That and a good weekends rest did wonders too!.

iPDF-poppler passworded document

Note: I am not sure if this is better here, or at superuser, but since it concerns the poppler library, I would assume here, because people here are more likely to know how it works.
Software: iPDF 2.12 + Poppler 2.11 (Last commit 2006-12-12) for Irex Iliad. Sources are here.
Problem Documents: Sciam digital PDFs (any of them, since all are produced the same way).
The document will load fine using Okular, Adobe Reader, and XPDF without requesting any passwords, and can be read without problem.
Loading using iPDF - so poppler - requests a password to open the document.
I have tried bypassing the SecurityHandler:checkEncryption method in Poppler/SecurityHandler.cc, by making it return true. This works, but fails to load the pdf with errors:
Error: Unsupported version/revision (4/4) of Standard security handler
Error (13571568): Unknown compression method in flate stream
Error: Top-level pages object is wrong type (null)
Error: Couldn't read page catalog
(PV_E)PDFCore.cpp:61,open() Open PDF document (èÖ#(èÖ#à failed with error code 2
(PV_E)PDFApp.cpp:185,open() Could not open file!
This suggests that the actual stream is encrypted, which - if true - suggests that okular is somehow bypassing this.
I am aware of people having similar problems on other mobile devices (I found a similar report with a Nexus One).
I do not know enough about how the pdf format works to know whether there is some 'default' password that should be used instead to open (no other permissions needed) the document. Is there?
Is it a case that it is requesting the owner password, when it only needs to use the user password (blank?) to open it?
Else, does anyone know how something like Okular/XPDF would be able to open it without problem?
This turned out to be an issue with the version of poppler being used by the application being too old for the required security handler.
As such, I have started my own project to create a new pdf viewer for my iliad based on the latest (0.14.*) version of poppler which can handle it. Sources here.