Copy link to clipboard
Copied
Hello
Has any body been successful using the PDFSharp.dll in InDesign plug-ins
Thank you in advance,
Copy link to clipboard
Copied
Why would you want to use a knock-off when InDesign comes with the original PDF producing library?
Besides it sounds like it is only available in Windows, and "managed code" / .Net (scripting bytecode) rather than native C++.
The large majority of my clients prefers Macs.
Dirk
Copy link to clipboard
Copied
Hi Dirk,
I need the pdf page count, page width, page height and measurement type.
I need that information withowt having to place every pdf page.
If such thing can be done withowt having to place every pdf page in order to get that information, please give me a hint.
Regards,
Ervin
Copy link to clipboard
Copied
Ervin,
I see, you need the library to inspect the PDF rather than to produce/output.
As you can tell from the import options dialog (e.g. using Cmd+D to place, then check the matching options checkbox) the number of pages must be available somewhere. I guess that dialog is part of the the import provider itself and not exposed. For the other information (the various bounds / boxes) there is not even a specific field when you placed them, so you can only determine them from the outcome after a matching choice of import options. Yuck.
Apparently you are on the right track with an external library, or you just follow the PDF reference/spec and do it yourself. The needed information is pretty easily reachable.
Regards,
Dirk
Copy link to clipboard
Copied
Hi Dirk,
Thank you for your response.
I was reading all these days about the IPDFPlacePrefs. And the desciption from the SDK manual is:
<IPDFPlacePrefs. Public interface used to remember the PDF place options.
This interface is used by the PDF place code to hold the settings the user selects in the PDF options dialog.>
There is a function called GetAllPages, with the description: <Method to get the total pages of the PDF and whether all pages are being placed.>
I did made it to work for example: to place a cpecific page from the pdf. But I do not know how to implement it in order to get the information from the PDF option dialog (if that optoin is checked by the user). If you know any solution around that please give me a hint, so then I can use the GetAllPages function.
As per page width and page height yes I have to place it and then measure the frame box. But if I have to know per each page (just to make sure they are the same size) then it is not the best solution.
Acording to the external library PDFShap is made on C# and maby for that thing to work I have to enable the /clr in the plug-in options, and doing that I can not build the plug in.
Instead of that I did try succesfully an other library QuickPDFLite. Just placed (QuickPDFLite0812.h, QuickPDFLite0812.cpp) in my code and I get page count from pdf, and page width and height.
But since InDesign has all that information in the PDF option dialog why not use that. I think the key is the IPDFPlacePrefs. I know how to set those preferences, but I was not successfull geting and reading the information from it. If you know how, please advice me.
I do thank you
Best regards,
Ervin
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more