Moderators:TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
Forum rules DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
I am developing a simple c# application to save a pdf file as pdf/a file using
only PDF-XChange Editor SDK and not using IPXV_Control. After refering few forums I got this code
If you have used the IAUX_Inst::FormatHRESULT method like the Forum Rules header tells, you would have found that that message means:
Error [Operating system]: The process cannot access the file because it is being used by another process.
You opened a file so that you can convert into it and then you tried to open the document from the same file that is already opened (and judging by your flags it is always created as a new file).
Well the steps should be:
1) You find the needed converter.
2) You open/create the file in which you want to convert your file.
3) You specify the source document that differs from the resulting file (unlike your sample).
4) You pass that all to the Convert() method.
Code it like that (not just by copying the sample but understanding what you are doing exactly) and it all should work.
I am receiving following error:
"Object reference not set to instance of an object"
in the following line:
PXV_FmtCheckResult ckhResult = importConverter.CheckFormat(pxvInst, srcDoc);
I know the error has occured because of the following line:
PDFXEdit.IPXV_ImportConverter importConverter = null;
But I am not able to code the required thing. Hence can you please help.
Please note that I have recently started working with this library and I am yet to get familiar with all the functionalities. Hence I am seeking much of your help.
'Value does not fall within the expected range.' in the following line:
PXV_FmtCheckResult ckhResult = importConverter.CheckFormat(pxvInst, srcDoc);
I am trying to detect a pdfa file. But in import convertor ID list I could not find any ID related to pdfa, hence I selected conv.imp.pdf. Please correct me.
Below is my code:
PDFXEdit.IPXV_ImportConverter importConverter = null;
for (uint i = 0; i < pxvInst.ImportConvertersCount; i++)
{
string h = pxvInst.ImportConverter.ID;
if (pxvInst.ImportConverter.ID == "conv.imp.pdf")
{
importConverter = pxvInst.ImportConverter;
}
}
I've mislead you a little. What you need to do is obtain the PXC_PDFStandard from the IPXC_DocumentProps that can be obtained from here: https://sdkhelp.pdf-xchange.com/vi ... ment_Props
You won't need any converter for this - only the IPXC_Document.