[Question 1-1-1] When I want to run my application asynchronously with DocuWorks prior to my application, must I start DocuWorks programs such as DocuWorks Desk or DocuWorks Viewer on my PC? While my application is keeping the handle of a DocuWorks document, is the handle protected from other processes of DocuWorks? |
[Answer] You don't need to start either DocuWorks Desk or DocuWorks Viewer. A handle of a DocuWorks document in your program is exclusively used by your program, and protected from other DocuWorks applications and other applications using XDWAPI. |
[Question 1-1-2] When using XDWAPI 6.x, must I recompile the application developed by XDWAPI 5.x? |
[Answer] No. XDWAPI 6.x binary has upward compatibility with XDWAPI 5.x binary. Even if accompanied with DLL of XDWAPI 5.x, when using the application developed by XDWAPI Ver.4.x , you don't need recompilation. However, we recommend you to carry out a check of the operation with XDWAPI 6.x in advance. |
[Question 1-1-3] Does the application developed using XDWAPI 6.x operate on the platform that DocuWorks 5.x is installed? |
[Answer] The application developed using the library of XDWAPI 6.x does not operate on the platform which DocuWorks 5.x is installed. You need DocuWorks 6.0 or later. |
[Question 1-1-4] The following message appeared when running the software created using XDWAPI of the latest version, "The ordinal [number] could not be located in the dynamic link library xdwapi.dll" Why does this occur? |
[Answer] When running the program using XDWAPI in the Windows system directory, you need xdwapi.dll, xdwapia.dll, and xdwapib.dll, which are included in the DocuWorks Development Tool Kit. However, if there are DLL files of a later version in your system directory, keep using those files. Do not overwrite them with the older files. |
[Question 1-1-5] Do either Adobe® Acrobat® or Adobe® Acrobat® Elements® need to be installed to my PC in order to output a PDF file using the function such as XDW_ConvertPageToImageFile() or XDW_GetCompressedPageImage()? |
[Answer] You do not have to install either.XDW_ConvertPageToImageFile() and XDW_GetCompressedPageImage() output PDF file using Fuji Xerox proprietary technology. |
[Question 1-2-1] Can I use the API functions directly from Microsoft® Visual Basic®? |
[Answer] Visual Basic® can call XDWAPI directly. However, since only XDW_MergeXdwFiles() uses array of character string as its argument, it cannot be directly called from Visual Basic®. Please refer to the manual of Visual Basic® about the method of calling the function in DLL. |
[Question 1-2-2] In which DLL is each function contained? I want to use XDWAPI from VBA. |
[Answer] All entry points of the interface described in the specification document are contained in "xdwapi.dll." Specify "xdwapi.dll", when you call directly from Visual Basic® and VBA. |
[Question 1-3-1] Depending on a TIFF file to input, DocuWorks hangs up after outputting 0 byte length file when converting a TIFF file into a DocuWorks document using XDW_CreateXdwFromImageFile(). Is this an error? |
[Answer] It is not an error. Depending on a file, it takes long time to convert. It is normal operation that 0 byte length file is generated temporarily. |
[Question 1-3-2] While converting an application file into a DocuWorks document, can I cancel the conversion by user interruption. Can I cancel the conversion by timer interruption, which is invoked after a specified time and measured by using SetTimer() etc? |
[Answer] Calling XDW_CancelCreationFromAppFile() makes DocuWorks document conversion stop. However, keep in mind that execution of application is not stopped even if you call XDW_CancelCreationFromAppFile() when application displays a dialog box and printing processing is interrupted. |
[Question 1-3-3] When I convert sheets of Microsoft® Excel into DocuWorks document using XDW_BeginCreationFromAppFile() and supervise the conversion process by XDW_GetStatusCreationFromAppFile(), the function returns "the completion of processing" just after finishing the first sheet. How can I convert all sheets? |
[Answer] You can convert all sheets by unifying the resolution of the sheets of Excel into the printing resolution (default is 600dpi) of DocuWorks Printer. Such thing happens because Excel prints the file by dividing into multiple jobs. |
[Question 1-3-4] When I extract texts from a document created from Microsoft® PowerPoint®, the bullets of the bulleted lists corrupt. Is this an error? |
[Answer] It is not an error. Text extraction of XDWAPI is the function that outputs only a character code, and font information is not included. For this reason, it may differ from the display in DocuWorks Viewer. |
[Question 1-3-5] When I save the thumbnail image acquired by XDW_GetThumbnailImageHandle() and then convert the saved file into DocuWorks document by XDW_CreateXdwFromImageFile(), the function always returns "XDW_E_INVALIDARG." Is this an error? |
[Answer] It is not an error. The number of colors of the thumbnail image acquired by XDW_GetThumbnailImageHandle() becomes the same as the screen color of the display. On the other hand, the numbers of bits per pixel of a DIB format convertible into a DocuWorks document by XDW_CreateXdwFromImageFile() are only 1, 4, 8 and 24 bits. Therefore, if your screen color is 16 bits or 32 bits color, you cannot convert the thumbnail image to a DocuWorks document. |
[Question 1-3-6] What is the purpose of XDW_CreateXdwFromImageFileAndInsertDocument()? |
[Answer] XDW_CreateXdwFromImageFileAndInsertDocument() provides the function that unified two functions, XDW_CreateXdwFromImageFile() and XDW_InsertDocument(). Since no temporary file is generated, it runs more efficiently. |
[Question 1-4-1] Which annotation can be parent annotation? |
[Answer] Among the annotations provided by DocuWorks, only notepad annotation can be a parent annotation. The value of nChildAnnotations of a notepad annotation is total number of annotations currently stuck on the notepad annotation. |
[Question 1-4-2] XDW_GetAnnotationInformation() returns "other errors (XDW_E_UNEXPECTED)." The error may occur on every pages. On the other hand, depending on the document, the error does not occur at all. Why does this happen? |
[Answer] XDW_E_UNEXPECTED shows the errors considered not to happen under normal environment and normal data. A general reason cannot be specified. XDW_E_UNEXPECTED may return when the specified page number or annotation number is beyond the number of pages or the number of annotations. |
[Question 1-4-3] For attributes of annotation such as XDW_ATN_Text, XDW_ATN_Url, and XDW_ATN_XdwPath does DocuWorks limit the length of the text? |
[Answer] DocuWorks limits the size of an attribute to 50 MB. The system resource capacity also limits the size. We recommend you to use in the range that can be displayed by DocuWorks Viewer. Moreover, the maximum length of a path name is 255 bytes. |
[Question 1-4-4] When deleting one annotation after another by using XDW_RemoveAnnotation(), it becomes impossible to acquire the handle of annotation during the operation. Why does this occur? |
[Answer] When you delete each annotation in a control loop, please don't forget that the ordinal number of annotations changes according to the decrease of the number of the annotations. For example, you can delete all of annotations successfully by deleting the handle of the first annotation every time. |
[Question 1-5-1] Can XDW_MergeXdwFiles() compound the original data? |
[Answer] When DocuWorks files to which original data is attached are merged, the original data are merged and attached to the merged DocuWorks file. |
[Question 1-5-2] How many DocuWorks documents can be merged by XDW_MergeXdwFile()? |
[Answer] There is no limit except the system resource capacity. |
[Question 1-6-1] How can I remove the character strings resulting from OCR that the function XDW_ApplyOcr() added to the DocuWorks file? |
[Answer] You can remove the character strings resulting from OCR by calling XDW_SetOcrData with the third parameter as NULL. |
[Question 1-7-1] Can I aquire or set the text for header/footer or page number? |
[Answer] You can set it by XDW_SetPageFormAttribute(). You can aquire it by XDW_GetPageFormAttribute(). You can update and delete it by XDW_UpdatePageForm() or XDW_RemovePageForm(). |
[Question 1-7-2] As for two functions, XDW_UpdatePageForm() and XDW_RemovePageForm(), please let me know the meaning of their parameter, nOtherPageForm. |
[Answer] For example, you set up and update the page number of a DocuWorks document. Then you add the DocuWorks document into a DocuWorks binder, and set up the page number of the binder. When updating the page number, you can specify how to deal with the page number of the document, delete or keep.If XDW_PAGEFORM_STAY is specified, the page number given first remains as it is. As a result, the page numbers of both the DocuWorks document and the binder are set. If XDW_PAGEFORM_REMOVE is specified, the page number given first is lost. As a result, the page number of the DocuWorks binder remains. |
[Question 1-8-1] What is the page condition of compression when XDW_GetPageInformation() returns "Exterior JPEG ("XDW_COMPRESS_JPEG")"? |
[Answer] When the page is converted from the JPEG file by DocuWorks Desk or by using XDW_CreateXdwFromImageFile(), XDW_GetPageInformation() returns XDW_COMPRESS_JPEG. |
[Question 1-8-2] At calling XDW_GetPageInformation() for an application originated page, even if I specify structure object XDW_PAGE_INFO_EX, I cannot acquire the information such as width, height and resolution. |
[Answer] As for acquisition of the information on original data, only the following kinds of document is applicable. - A document created from an image (an image document) - A reduced application-originated document whose original data is longer than the long edge (420mm) of A3. (Reducing the size of an application-originated data is a new function in DocuWork 5.0.) You cannot acquire the information on pages which does not meet the condition above. |
[Question 1-8-3] XDW_GetDocumentInformation() sometimes returns 7 as the value of nVersion for a file that is created by DocuWorks 6.0. Why isn't the value 9? |
[Answer] The file format version for a document that is created by DocuWorks 6.0 is not always 9. DocuWorks 6.0 can also make a file compatible with DocuWorks 4.x, which uses a file format version of 7. For details of file compatibility, please see DocuWorks online help. |
[Question 1-9-1] Does an attribute value have limitation of length? |
[Answer] The limitation of the length of an attribute value is 50MB. The value is limited also as resource. |
[Question 1-9-2] Please tell me how to set up a user definition attribute, without increasing the size of a DocuWorks document. When I updated the value of a certain user definition attribute with another same sized value using XDW_SetUserAttribute(), the size of a DocuWorks document increased. Moreover, even when I deleted an attribute by replacing the address of the byte sequence of an attribute with NULL, the size of a DocuWorks document increased. |
[Answer] In order to improve the file saving speed, when there is little change, DocuWorks only appends the changed portion to the end of a file. Therefore, file size may increase. If you execute [Save As] from DocuWorks Viewer, the deleted areas are packed and the whole file size may become smaller. Moreover, when the unnecessary data portion increases to some large extent, DocuWorks also compacts as well. You can make compacted DocuWorks data by calling a XDWAPI function, XDW_OptimizeDocument(). |
[Question 1-9-3] Please let me know the difference between a user definition attribute and the user definition of a document attribute. |
[Answer] They are quite different. The user definition of a document attribute can be operated also from Desk or Viewer. From Desk or Viewer, a user definition attribute cannot be operated but can be treated only by XDWAPI. |
[Question 1-10-1] Is there any method of delimiting the texts extracted using XDW_GetPageText()? In order to use delimiting characters, when creating a DocuWorks document, is there any method of passing the unprintable characters from an application? |
[Answer] There is no such method. The texts passed from applications when creating a DocuWorks document are only consisted of printable characters. Unprintable character cannot be embedded as a delimiting character. |
[Question 1-10-2] By using XDWAPI, can I set up or change the security to a document? |
[Answer] By XDW_ProtectDocument(), you can set up the following securities . - Password (V4 compatible) - Password (128bit V4 non-compatible) - Digital Certificate The documents that can be set up a security are as follows. - non-protected document - protected document (DocuWorks Electronic Signature) - protected document (Digital Certificate) But for protected document, it must meet the conditions to enter full access mode. |
[Question 1-10-3] In what case should I use XDW_SucceedAttribute()? |
[Answer] For example, you make a DocuWorks document from a certain application, and set attributes, and paste annotations on it. After you edit the original data of the document and re-create a DocuWorks document, you can pass the attributes and annotations from the original DocuWorks document to the recreated DocuWorks document by using the function. To the new document, you can easily set the attributes and annotation that you once setup. |
[Question 2-1] Although I placed my DLL in "<DocuWorks installation directory >\bin\plugins\", the function name was not displayed when setting up a plug-in. Is there some notice about the loading of the created DLL? |
[Answer] DocuWorks Desk loads DLL in "<DocuWorks installation directory>\bin\plugins\" as plug-in DLL when starting Desk. The developer of plug-in does not need to be aware about loading. The cause of the DLL not loaded well is may be that the SPI function is not exported correctly. Check whether all SPI functions are implemented by the right name and exported. Moreover, there may be a problem not only as a plug-in DLL but also as a general DLL. For example, are other required DLLs also installed? |
[Question 2-2] In order to acquire the length of a function's name, can I make DocuWorks Desk allocate memory according to my application's request? |
[Answer] Yes. At the call of PLG_EnumerateCommands(), bind the requested data length to pnBufSizeRequired and return 0, if nBufSize is smaller than the requested data length. By this, DocuWorks Desk allocates the size to cmdNameList, and calls PLG_EnumerateCommands() again. |
[Question 2-3] Can I use C++ class for implementing plug-ins? |
[Answer] Yes. However, notice that you must export the SPI functions as C functions. From the C functions as entry points, you can call member functions of C++ classes which perform actual processing. |
[Question 2-4] Can I use PCH files? I found that in the file of the provided sample code, the compile option of C++ is "Not Use Precompiled Header". |
[Answer] You can use precompiled header. |
[Question 2-5] By restarting Desk after replacing DLL, can I switch old plugged-in functions to new ones? |
[Answer] You can replace DLL if you can keep the compatibility of setup data. |
[Question 2-6] The following message was displayed when setting up a plug-in of a software created using API of the latest version to DocuWorks Desk. Why does this happen? "The plug-ins below are outdated. This may cause trouble. Remove all menu items supported by this plug-ins then remove the plug-ins files using the Explorer. Then this message will not appear again." |
[Answer] PLG_CanFinalize() or PLG_IsParallel() may not be exported from the plug-in DLL. Check whether you have implemented the right function name. |
[Question 2-7] Can I use the API functions directly from Microsoft® Visual Basic®? |
[Answer] Visual Basic® cannot make plug-in DLL that calls plug-in SPI directly. |