Skip to main content

Hi, I made a super simple 3 pages "Lorem ipsum" file with docx and saved as pdf, I'm new to PDF in FME and wanted to test just to add a simple rotated text using point creator, text adder, pdf formatter, but how about the next step?? How do I write the result to a pdf? Tried connecting my reader and my created text to a new pdf but the content is white except for my creted text, but I want to keep the existing text and just add for example a transparent text and an image, but its it more complicated than I thought. Do I need spatial reader or non spatial? Im only interested in adding extra stuff to every page to an existing pdf with the PDFStyler, then writing it as an addition to an existing PDF.

Most happy answer would be a template workspace with:

-PDF READER

-PDF WRITER

-PDFStyler that you can connect to the writer or multiple even to add to existing pdf (since I could not even make a simple read write pdf copy in FME)

 

 

 

pdf:

pdftext: (no idea where the yellow stuff is or came from)

text 

workspace:

Capture Result: Missing existing pdf text

result 

Hi @clowncutie​,

 

You do not have to use the PDFPageFormatter or PDFStyler since you are reading and writing to PDF. The PDFPageFormatter sets pdf format attributes--which in your case already exist on features (since the source format is also PDF).

 

One way of adding the watermark feature would be to create and then move it to the location of a page center. Different pages can have varying sizes--you can dynamically get the size of a page by using the pdf_page_metadata feature type. I have included an example workspace which demonstrates this method when reading from and writing to PDF.

 

Note that you can change the text string and size of the watermark feature by accessing the Geometry Object properties in the Creator.

TextObjectPropertiesI hope this example helps.


Reply