-
Notifications
You must be signed in to change notification settings - Fork 274
How to Download annotate PDF ? #40
Comments
So the library doesn't actually create an annotated pdf file. It works by putting an overlay on top of the rendered pdf with the annotations. The annotations are just stored in JSON in the browsers local storage, if you want to use them elsewhere you might be able to implement a store adapter to get the JSON out but you'd probably still need this library to render them |
In my case, I save annotations in database. I have a controller action for download which reads original pdf file using fpdi, retrieves annotations from database, inserts them into pdf using tcpdf and finally returns the new annotated pdf also with tcpdf. |
Hi @fdbatista thank you, I did it using same rule, only difference i have not use tcpdf or fpdi, I build my own custom code written in node, Please find the URL, draw some annotation and press on download button. https://pdf-annotate.herokuapp.com/ I will also look to try for fpdi and tcpdf in my free time, Thanks |
Hi @rmemon I am working on PHP and i am making pdf annotation. Could you tell me How to integrate Download button my PDF annotation in php without using tcpdf or fpdi. |
Hi @rmemon thank you, can you help me out in doing the download the annotated PDF using node stuff as I am struggling with same issue. |
I have built my custom code on the back-end using C#.NET which parses the JSON annotations and creates those annotations in PDF. However, I am facing issues with coordinates positions with some annotations such as 'drawing' |
Hi @jadhavajay, can you share your code? |
@fdbatista |
Hi, @gaganmurghai. That might be a problem with the measure unit you're using. When you instantiate the FPDI object, you must pass a parameter that specifies the measurement unit, like this: $pdf = new FPDI('', 'pt', 'A4', true, 'UTF-8', false, false); If I'm not wrong, because I haven't touched this code in a while, the 2nd parameter stands for Points. There are also pixels, millimeters and so one, but Points work for me. Happy coding. |
I already did.
|
@fdbatista thanks for sharing the code. I am using almost same logic but it doesn't work. Let me try again and I will get back to you. Again thank you very much. |
@fdbatista Can I use image instead of text annotation. Actually I have tired Image for this
But when I am passing x and y coordinates it changes the position. Have you any Idea for that. And also I want to add image on particular page. When I was trying previous code it parse the image on all the pages. Please me know if you have any idea for the same |
About the position, try changing the unit, as I said previously. $pdf->AddPage(); |
thanks @fdbatista I will try it. |
@rmemon @fdbatista @KaneMorgan Hello guys, I am looking for alternate of fpdi and tcpdf in node js. Actually I have built the functionality to download Pdf with annotations in php but now as per my requirements I need this in node Js. |
Hi @gaganmurghai |
@rmemon thanks, I will try this one. |
@rmemon could you pls share me the code |
@Vishnupriya112 @rmemon If possible can you please guide me and please share some code. It will be really helpful for me. Thanks in advance. |
Hi @Vishnupriya112 @gaganmurghai I am Sharing code to draw Circle, at position X:400, Y: 400, radius: 30 , page: 1
Let me know in a case of any concerns. |
Hi @rmemon Please provide some valuable solution for below issue.
Thanks in advance. |
I have tried this because of annotaion size is big Request Aborted is shows.How can I overcome this issue |
Hello @rmemon as you mentioned in above code "I am Sharing code to draw Circle, at position X:400, Y: 400, radius: 30 , page: 1". I am not able to found the page that where I need to add this parameter in code i.e page number. Please suggest me. Thanks |
Please provide your page number parameter here,
|
Thanks a lot @rmemon |
Hello @rmemon, |
@gaganmurghai Can share PDF ?? |
@rmemon thanks there was issue with pdf. Now I am trying to Place image on pdf and I am passing the x,y coordinates on in code but its not showing the image on appropriate place. Can you have any idea. I think there is a issue with measurement unit. Also I want to place images on multiple pages. Please help me this in too. How we can define number of pages. As you have mentioned I have tried this but it was not working. var pageModifier = new hummus.PDFPageModifier(pdfWriter,page_number,true); // page_number [0,1,2,3....,] Thanks again. |
this file is not downloading. |
@aathirag Thanks i will look for this pdf, shortly. |
@rmemon I want to add multiple images on multiple pages. But only able to add one image at a time. Please help me out in this. Here is my sample code.
|
In the above code, you are always modifying the source path. Which does not contain any annotation.
|
@aathirag have you got it ? |
hi Can you please make a public repo of this project so I can also use it??? |
@rmemon I can able to download the pdf with annotation. But In Adobe reader am getting error |
After adding certain annotation, how to download annotate pdf,
Thanks in advance
The text was updated successfully, but these errors were encountered: