Consider, if we have attachment added to "Quote" object and we need to generate "order" object record from attached quote PDF based on trigger or anything.

Is it possible in salesforce to read the PDF and generate record from it? Up to my knowledge there is no way in Apex to do the same or by any way we can implement the same.

Let me know if you have any sugesstions for the same.


There is no direct way I think you can do this in apex.

But if you are using Visualforce with Apex then you can using some Javascript library like pdf2htmlEX (I never used this before) but if you want you can try this.

If you are doing in trigger then I don't think there is another option unless you host a Java webservice on Heroku and make a request and convert your PDF there and once you have file in HTML then you can easily read that and create record.

  • Ok tushar let me refer this. its fine i will use VF page
    – sumit
    Aug 22 '16 at 9:00
  • Hey Can we convert PDF to XML in salesforce?
    – sumit
    Aug 22 '16 at 10:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.