2026-02-18 01:06 PM
Hi all,
I'm struggling to work out even where to start with importing a PDF to a layout using the API. I found an older thread (CREATE A DRAWING FROM A FILE? - Graphisoft Community) asking a similar question but no had luck in finding anything useful.
If anyone has any pointers or an example they could provide, please let me know.
Thanks,
Rob
Solved! Go to Solution.
2026-03-10 10:51 PM
Hi Rob,
Unfortunately there is no PDF importer that can be called from the API.
It's still valid what Ákos wrote in the linked post. You can create an empty drawing and add elements to it via the API. For the input to be the PDF file, you'd need a library of functions that can extract drawing primitives from the PDF that then can be added as primitives to the drawing.
You can find the skeleton code for it in the example Element_Test.
Best regards,
Tamás
2026-02-24 08:59 AM
Hi Rob,
It's surprising that there's no API call to do it, but it seems so.
@Akos Somorjai you answered in the mentioned post about different approaches. Do you have any suggestion on how to approach linking PDF's via the API?
Best regards,
Bernd
2026-02-25 03:12 PM
Hi!
I'm looking into it, if there's a way with PDFs.
Regards,
Tamás
2026-03-02 12:41 PM
Hi Tamás,
Thanks for giving it a look, let me know if you find anything - I'm sure I'm not the only one needing something like this 😁
Thanks,
Rob
2026-03-10 10:51 PM
Hi Rob,
Unfortunately there is no PDF importer that can be called from the API.
It's still valid what Ákos wrote in the linked post. You can create an empty drawing and add elements to it via the API. For the input to be the PDF file, you'd need a library of functions that can extract drawing primitives from the PDF that then can be added as primitives to the drawing.
You can find the skeleton code for it in the example Element_Test.
Best regards,
Tamás