How to convert PDF to Microsoft Word document in PHP using Aspose.PDF REST API

I am trying to evaluate your PDF to Word Cloud API. I would like to use it with an existing PHP program that currently creates PDFs to give the user additional options to display the document as a DOC or RTF so they can edit it. This looks like it is exactly what I need. I have spent some time searching the help but so far have not been able to successfully perform a conversion. (I have created an account and generated a key, etc… but I am pretty sure I am missing something crucial somewhere in my code.)

Do you have a quick FULL PHP example of a PDF to Word conversion?

Thanks

Hi Sara,

Thanks for contacting support.

Please visit the following link for required information on converting PDF files to DOC, Image, TIFF, HTML and other formats .

Thank you for your quick reply. I was aware of that page. I am not doing something correctly with the rest of my code to properly make the call to do the conversion. Unfortunately, I am not very familiar with use and namespacing so I suspect I have something wrong in that area.

I think I can be set on the correct path if you could possibly provide a full code example.

Thanks

Hi Sara,

Both SDK and REST examples are attached. You just need to unzip this file, set App SID and Key and grant PHP user the write permission to Output folders.

Note: These examples use CURL to handle requests and responses so you need to install CURL to use these examples.

Best Regards,

Thank you! I was making this much harder than it is.

I am able to run a test conversion of a pdf contract that I programmatically generated using fpdf. About 95% of it looks great but there seems to be some alignment issues with the data as well as problems aligning signature lines and other drawn boxes. I can send you the original PDF as well as the doc that was produced by the conversion, but I would prefer to send that via a non-public method. (It seems that I can’t change this message to private so please let me know the best way to send the files)

I would really like to be able to use the API but I need to know if the issues I am seeing can be resolved.

Thank you for you assistance.


Hi Sara,

Although attachments are accessible to thread owner (you in this case) and Aspose staff only but you can also follow the instructions at http://www.aspose.com/corporate/purchase/faqs/send-license-to-aspose-staff.aspx to send the input files to me. I can also mark this post as private if you want. No one other than you and Aspose staff will be able to view this thread in that case.

Best Regards,

Thanks. I have attached the original pdf and the generated doc here since they will not be able to be viewed by anyone. The tread may be useful to someone else so it is not necessary to make the post private.

The converted doc is very close but you can see that there are some alignment issues on the first page, second column beginning around Section I, Line 7. On the second page, section IV the signature underline is off. I also noticed the same underline alignment problem when I converted your Sample.pdf to .doc using the code examples you provided (thanks again for that). The drawn boxes on the disclaimers on the second page are off as well as the lines in the shaded area at the bottom of the contract. The font changes to Times, but that is not that big of an issue for me. The formatting problems are the things preventing me from using the API right now.

Can you let me know if these formatting problems are “fixable” and when they may be available?

Thanks for your continued help.

Hi Sara,

Thanks for your inquiry.

halcyonfhms:

The converted doc is very close but you can see that there are some alignment issues on the first page, second column beginning around Section I, Line 7.


I am afraid I am unable to notice the alignment issue. Can you please share a screenshot and point us to the problem.

halcyonfhms:
On the second page, section IV the signature underline is off. I also noticed the same underline alignment problem when I converted your Sample.pdf to .doc using the code examples you provided (thanks again for that). The drawn boxes on the disclaimers on the second page are off as well as the lines in the shaded area at the bottom of the contract.


We have noticed the lines/boxes formatting issue and log it in our issue tracking system as SAASPDF-113 for further investigation and resolution. We will notify you as soon as it is resolved.

We are sorry for the inconvenience caused.

Best Regards,

I have attached a scan of the generated .doc and denoted the alignment problems.

Is it possible to give me a rough estimation of when the fixes will be available - days, weeks, months? I think your cloud API conversion is the best fit for what I need to do. Unfortunately I have some clients waiting on .doc versions of the pdfs that my application produces so I have a bit of a timeline.

I need to decide if I can wait for the alignment issues to be corrected in your API or if I should start programming rtf versions in addition to the pdf versions of the forms within my application. (There are a lot of PDFs so I REALLY do not want to do that…)

Thank you

Hi Sara,


Thanks for sharing additional information. We have notice the issue and logged it out bug tracking system as SAASPDF-114 in our issue tracking system for further investigation and resolution.

In reference to ETA, we have already logged your request with highest priority and also requested our development team to share an ETA at their earliest. We will keep you updated with issue resolution progress.

We are sorry for the inconvenience caused.

Best Regards,

Hi Sara,


Thanks for your patience.

We are pleased to share that the issues reported earlier as SAASPDF-113 and SAASPDF-114 are resolved. Please continue using our API’s and in the event of any further query, please feel free to contact.