Hello, I am trying to make an automation to edit the text of some pdfs, just small pieces of text like a date and price. And I would like to keep the overall look of the file with images and fonts, etc. I have seen older posts mentioning Word file conversion or html conversion, I dont know if they are outdated… Could you help me find a straightforward way of doing this? Thank you
if you only need to change small pieces of text like dates or prices, I’d avoid converting the PDF to Word/HTML, as the formatting can change.
If possible, use a PDF editing library/activity that supports direct text replacement. This will help preserve the existing fonts, images, and layout.
Thank you, do you have an example for such library? The ones I have seen were not Windows compatible
Hi @idoia.fernandez ,
For small updates like dates, prices, or invoice numbers, the most straightforward approach in UiPath is:
- Use PDF activities or Document Understanding/OCR to locate the text you want to change.
- Convert the PDF to an editable format (Word is usually easier than HTML).
- Replace the required values using Replace Text activities.
- Export/save it back to PDF.
However, if preserving the exact layout, fonts, images, and formatting is critical, converting to Word can sometimes slightly alter the document. In that case, consider using a dedicated PDF editing library (such as PDF Suite, Adobe PDF Services, or a custom .NET/Python library invoked from UiPath) that can edit text directly within the PDF.
Thanks
you can look at iText 7. It works with .NET/Windows and can be used from UiPath through C# or a custom activity. It supports working with existing PDFs while preserving the layout better than converting to Word.
Just note that direct text replacement in PDFs can be tricky depending on how the PDF was created. UiPath’s native PDF activities currently focus mainly on reading/extracting, not editing.
Hi @idoia.fernandez,
Actually, there are couple of UiPath Marketplace reusable components which you can try.
Option 1: If your PDF has fillable form fields (check in Acrobat like clickable boxes for date/price), then try this approach.
Install Novigo PDF Forms Activity Pack (free, Marketplace). Get PDF Form Fields → run once on your template to find exact field names. Build a Dictionary<String, String> with those field names → new values. Set Form Fields → Template Path, your dictionary, Output Path.
Novigo Solutions - PDF Forms Activity Pack | UiPath Marketplace
Option 2: If it’s a flat/printed PDF (no fillable fields like most generated invoices/statements) then try this approach.
Install PDF.co Activities (Marketplace, free tier available) → get API key → drop a PDF.co Scope with the key. Add Rectangle to PDF (white fill) over the old text’s X/Y/Width/Height. Add Text to PDF at the same X/Y, stamps in the new date/price. Set Destination File Path → output PDF.
PDF.co - Activities for PDF Documents | UiPath Marketplace
Coordinates: find once in Acrobat (hover with Edit tool) since it’s a fixed template, then use them in the above steps.
Cheers!
If you only need to change small pieces of text such as a date or price, I would avoid converting the PDF to Word or HTML, as that can affect the original layout and formatting.
If the PDF has editable text, you can use a PDF library/activity to replace the specific text while keeping the rest of the document unchanged.
If it is a scanned/image-based PDF, you would need OCR first, but maintaining the exact original formatting becomes more difficult.
So the best approach depends on whether your PDF contains real text or scanned images. If you can share a sample PDF (with sensitive information removed), we can suggest the most suitable approach.
Hi,
If PDF.co is showing as not compatible with your Windows project, you could try the official UiPath.PDF.Activities package instead. It provides native PDF activities and avoids depending on a third-party package that may not support your project type/version.
For checking whether a PDF contains fillable form fields, you can try the PDF form-field activities available in the UiPath PDF package. If the PDF is a normal/static PDF without AcroForm fields, those fields won’t be detected—you would need to handle it using text/OCR or another PDF library.
Also, make sure the PDF package version is compatible with your Studio/project version before installing it.
Hope this helps!
