Just a guess: try with windoze style path separators, e.g. "C:\\\\Siemens\\\\Automation..."
Note also the system() call - don't know if windoze knows about "mkdir -p"
How to get WinCC OA Help as PDF?
- fandersen
- Posts:51
- Joined: Tue Aug 26, 2014 12:39 pm
Re: How to get WinCC OA Help as PDF?
Didn't help either, I added output of dbGetError to the log.
WCCOActrl3:["Path = C:\\\\Siemens\\\\Automation\\\\WinCC_OA\\\\3.14\\\\help\\\\en_US.utf8\\\\WinCC_OA.qch"]
WCCOActrl3:["Errornumber : "][-2147467259]
WCCOActrl3:["BaseError : "][0]
WCCOActrl3:["Description : "]["[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"]
WCCOActrl3:["SQL-errortext: "]["IM002"]
WCCOActrl3:["Path = C:\\\\Siemens\\\\Automation\\\\WinCC_OA\\\\3.14\\\\help\\\\en_US.utf8\\\\WinCC_OA.qch"]
WCCOActrl3:["Errornumber : "][-2147467259]
WCCOActrl3:["BaseError : "][0]
WCCOActrl3:["Description : "]["[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"]
WCCOActrl3:["SQL-errortext: "]["IM002"]
- mkoller
- Posts:741
- Joined: Fri Sep 17, 2010 9:03 am
Re: How to get WinCC OA Help as PDF?
Ah, yes. Windose ...
On Windows we do not use Qt to access a database, therefore it does not work like this with the QSQLITE driver.
You need to get a driver from somewhere which can be used to read from a SQLite database and configure this to be usable with
CtrlADO, e.g. as an ODBC provider, etc. Sorry, I can't help you further here.
Alternatively, use a Linux installation (e.g. in a VirtualBox)
On Windows we do not use Qt to access a database, therefore it does not work like this with the QSQLITE driver.
You need to get a driver from somewhere which can be used to read from a SQLite database and configure this to be usable with
CtrlADO, e.g. as an ODBC provider, etc. Sorry, I can't help you further here.
Alternatively, use a Linux installation (e.g. in a VirtualBox)
- Gertjan van Schijndel
- Posts:634
- Joined: Mon Aug 02, 2010 10:37 am
Re: How to get WinCC OA Help as PDF?
I have tried some SQLite odbc drivers, but without much luck.
1. SQLite ODBC Driver crashes
2. SQLite2010 Pro ODBC Driver the blobs only contain 2 bytes
1. SQLite ODBC Driver crashes
2. SQLite2010 Pro ODBC Driver the blobs only contain 2 bytes
- fandersen
- Posts:51
- Joined: Tue Aug 26, 2014 12:39 pm
Re: How to get WinCC OA Help as PDF?
Hi Gertjan,
I have tried this ODBC driver: http://www.ch-werner.de/sqliteodbc/
and configured a DSN with the name "help", selected the SQLite 3 driver and selected the help file.
I've tried this script to get the data: http://faq.winccoa.net/index.php?action ... artlang=en
and got the same result as Gertjan, data only contains 2 bytes (alll zeroes) ... AND if works it's gonna eat up your memory because it returns a dyn_dyn_any.
I tried the script that Martin posted and edited the connection string to "DSN=help". But it crashed the CTRL manager as it tries to open the database.
I also tried to access the data by writing a .NET program. It works but I have to look for a gzip library to uncompresses the data. I am not sure yet if the class GZipStream will do the job.
Because I need the manual quickly I setup a CentOS 7 vm. Hopefully it works better.
I'll let you know.
I have tried this ODBC driver: http://www.ch-werner.de/sqliteodbc/
and configured a DSN with the name "help", selected the SQLite 3 driver and selected the help file.
I've tried this script to get the data: http://faq.winccoa.net/index.php?action ... artlang=en
and got the same result as Gertjan, data only contains 2 bytes (alll zeroes) ... AND if works it's gonna eat up your memory because it returns a dyn_dyn_any.
I tried the script that Martin posted and edited the connection string to "DSN=help". But it crashed the CTRL manager as it tries to open the database.
I also tried to access the data by writing a .NET program. It works but I have to look for a gzip library to uncompresses the data. I am not sure yet if the class GZipStream will do the job.
Because I need the manual quickly I setup a CentOS 7 vm. Hopefully it works better.
I'll let you know.
- fandersen
- Posts:51
- Joined: Tue Aug 26, 2014 12:39 pm
Re: How to get WinCC OA Help as PDF?
the script of Martin does work under CentOS 7 flawlessly. I was able to extract the html pages including referenced resources.
However, creating a PDF from HTML is not as easy as one might think. I tried wkhtmltopdf.org but it is not following the links of the document. You have to add all of the documents your self. I'll try to make a single html file containing all chapters from all files. Then I will replace the links to the documents with bookmarks. Then the links should also work in the resulting PDF. Tests look promising.
I also created a .NET application to export the manal pages under windows. It uses a library for accessing SQLite. So no ODBC connection required.
Qt Compressed Help Extractor
However, creating a PDF from HTML is not as easy as one might think. I tried wkhtmltopdf.org but it is not following the links of the document. You have to add all of the documents your self. I'll try to make a single html file containing all chapters from all files. Then I will replace the links to the documents with bookmarks. Then the links should also work in the resulting PDF. Tests look promising.
I also created a .NET application to export the manal pages under windows. It uses a library for accessing SQLite. So no ODBC connection required.
Qt Compressed Help Extractor
- Gertjan van Schijndel
- Posts:634
- Joined: Mon Aug 02, 2010 10:37 am
Re: How to get WinCC OA Help as PDF?
Under Windows reading blob values has not been implemented. However it is possible to use the sqlite3 command line client to write the blob value to a file.
I have modified Martins script, now it also works under Windows there it uses the sqlite3 command line client from the SQLite3 ODBC driver to retrieve the blob values. However I guess it is a bit slower than running it under Linux, because the system function takes quite a bit of time.https://www.winccoa.com/fileadmin/image ... 170213.ctl
I have modified Martins script, now it also works under Windows there it uses the sqlite3 command line client from the SQLite3 ODBC driver to retrieve the blob values. However I guess it is a bit slower than running it under Linux, because the system function takes quite a bit of time.https://www.winccoa.com/fileadmin/image ... 170213.ctl
- Attachments
-
[The extension ctl has been deactivated and can no longer be displayed.]
- fandersen
- Posts:51
- Joined: Tue Aug 26, 2014 12:39 pm
Re: How to get WinCC OA Help as PDF?
Success...
wkhtmltopdf is a powerful tool. I started it in a script using the argument "--read-args-from-stdin" and write all filepaths in a string as one line to the standard input, adding the output path as last argument.
Manual of wkhtmltopdf
See the resulting pdf: Manual as PDF (Aprox. 114 MByte)
The tool noticed a few missing files. I have to investigate why they are missing.
wkhtmltopdf is a powerful tool. I started it in a script using the argument "--read-args-from-stdin" and write all filepaths in a string as one line to the standard input, adding the output path as last argument.
Manual of wkhtmltopdf
See the resulting pdf: Manual as PDF (Aprox. 114 MByte)
The tool noticed a few missing files. I have to investigate why they are missing.
- tobias_raab
- Posts:18
- Joined: Mon Feb 29, 2016 3:30 pm
Re: How to get WinCC OA Help as PDF?
Any news on this topic? Did you find a solution for windows users?
- peter.strumpf
- Posts:8
- Joined: Thu Jan 13, 2011 8:56 am
Re: How to get WinCC OA Help as PDF?
This script does not work on my V3.15P010, even, if I adjust paths in the beginning to be suitable to my Version?!
Logviewer reports:
WCCILpmon (1), 2018.06.20 10:01:50.108, SYS, INFO, 24/pmon, Erhielt START Befehl von ::1, starte den Manager WCCOActrl(3) auf Index 15
WCCILpmon (1), 2018.06.20 10:01:50.124, SYS, INFO, 1, Manager Start, C:\\Siemens\\Automation\\WinCC_OA\\3.15\\bin\\WCCOActrl.exe -PROJ GettingStarted_3.15 -pmonIndex 15 extract_help_khd.ctl
WCCOActrl (0), 2018.06.20 10:01:50.248, SYS, INFO, 1, Manager Start, PROJ, GettingStarted_3.15, V 3.15 - 3.15 platform Windows AMD64 linked at Feb 27 2018 21:34:56
WCCOActrl (0), 2018.06.20 10:01:50.248, SYS, INFO, 3, Trying to connect to (SYS: 0 Data -num 0 CONN: 1) @ localhost:4897
WCCOActrl (0), 2018.06.20 10:01:50.280, SYS, INFO, 4, Connected to (SYS: 0 Data -num 0 CONN: 1) @ 04651-CGN-PC7.cgn.khd.top (::1)
WCCILdata (0), 2018.06.20 10:01:50.295, SYS, INFO, 4, Connected to (SYS: 1 Ctrl -num 3 CONN: 1) @ 04651-CGN-PC7.cgn.khd.top (::1)
WCCILdata (0), 2018.06.20 10:01:50.326, SYS, INFO, 0, , Manager (SYS: 1 Ctrl -num 3 CONN: 1) initialised
WCCOActrl (3), 2018.06.20 10:01:50.326, SYS, INFO, 6, Initialization by Data Manager finished
WCCOActrl (3), 2018.06.20 10:01:50.342, SYS, INFO, 3, Trying to connect to (SYS: 1 Event -num 0 CONN: 1) @ localhost:4998
WCCOActrl (3), 2018.06.20 10:01:50.342, SYS, INFO, 4, Connected to (SYS: 1 Event -num 0 CONN: 1) @ 04651-CGN-PC7.cgn.khd.top (::1)
WCCILevent (0), 2018.06.20 10:01:50.389, SYS, INFO, 4, Connected to (SYS: 1 Ctrl -num 3 CONN: 1) @ 04651-CGN-PC7.cgn.khd.top (::1)
WCCOActrl (3), 2018.06.20 10:01:50.404, SYS, INFO, 102, Waiting for user names/passwords
WCCOActrl (3), 2018.06.20 10:01:50.404, SYS, INFO, 103, User names/passwords initialized
WCCOActrl (3), 2018.06.20 10:01:52.604, SYS, INFO, 181, Closing connection to (SYS: 1 Data -num 0 CONN: 1)
WCCILdata (0), 2018.06.20 10:01:52.604, SYS, INFO, 39, Connection lost, MAN: (SYS: 1 Ctrl -num 3 CONN: 1), Connection closed
WCCOActrl (3), 2018.06.20 10:01:52.620, SYS, INFO, 181, Closing connection to (SYS: 1 Event -num 0 CONN: 1)
WCCILevent (0), 2018.06.20 10:01:52.635, SYS, INFO, 39, Connection lost, MAN: (SYS: 1 Ctrl -num 3 CONN: 1), Connection closed
WCCOActrl (3), 2018.06.20 10:01:52.635, SYS, INFO, 39, Connection lost, MAN: (SYS: 1 Data -num 0 CONN: 1), Connection closed
WCCOActrl (3), 2018.06.20 10:01:52.666, SYS, INFO, 39, Connection lost, MAN: (SYS: 1 Event -num 0 CONN: 1), Connection closed
WCCOActrl (3), 2018.06.20 10:01:52.682, IMPL, SEVERE, 54, Unexpected state, some connections have been not closed ( 1) at:348 file:D:\\workspaces\\3.15\\workspace\\Exe\\CtrlExt\\CtrlADO\\DatabaseLayer\\ADOWrap.cxx
WCCOActrl (3), 2018.06.20 10:01:52.698, IMPL, SEVERE, 54, Unexpected state, some connections have been not closed ( 1) at:348 file:D:\\workspaces\\3.15\\workspace\\Exe\\CtrlExt\\CtrlADO\\DatabaseLayer\\ADOWrap.cxx
Logviewer reports:
WCCILpmon (1), 2018.06.20 10:01:50.108, SYS, INFO, 24/pmon, Erhielt START Befehl von ::1, starte den Manager WCCOActrl(3) auf Index 15
WCCILpmon (1), 2018.06.20 10:01:50.124, SYS, INFO, 1, Manager Start, C:\\Siemens\\Automation\\WinCC_OA\\3.15\\bin\\WCCOActrl.exe -PROJ GettingStarted_3.15 -pmonIndex 15 extract_help_khd.ctl
WCCOActrl (0), 2018.06.20 10:01:50.248, SYS, INFO, 1, Manager Start, PROJ, GettingStarted_3.15, V 3.15 - 3.15 platform Windows AMD64 linked at Feb 27 2018 21:34:56
WCCOActrl (0), 2018.06.20 10:01:50.248, SYS, INFO, 3, Trying to connect to (SYS: 0 Data -num 0 CONN: 1) @ localhost:4897
WCCOActrl (0), 2018.06.20 10:01:50.280, SYS, INFO, 4, Connected to (SYS: 0 Data -num 0 CONN: 1) @ 04651-CGN-PC7.cgn.khd.top (::1)
WCCILdata (0), 2018.06.20 10:01:50.295, SYS, INFO, 4, Connected to (SYS: 1 Ctrl -num 3 CONN: 1) @ 04651-CGN-PC7.cgn.khd.top (::1)
WCCILdata (0), 2018.06.20 10:01:50.326, SYS, INFO, 0, , Manager (SYS: 1 Ctrl -num 3 CONN: 1) initialised
WCCOActrl (3), 2018.06.20 10:01:50.326, SYS, INFO, 6, Initialization by Data Manager finished
WCCOActrl (3), 2018.06.20 10:01:50.342, SYS, INFO, 3, Trying to connect to (SYS: 1 Event -num 0 CONN: 1) @ localhost:4998
WCCOActrl (3), 2018.06.20 10:01:50.342, SYS, INFO, 4, Connected to (SYS: 1 Event -num 0 CONN: 1) @ 04651-CGN-PC7.cgn.khd.top (::1)
WCCILevent (0), 2018.06.20 10:01:50.389, SYS, INFO, 4, Connected to (SYS: 1 Ctrl -num 3 CONN: 1) @ 04651-CGN-PC7.cgn.khd.top (::1)
WCCOActrl (3), 2018.06.20 10:01:50.404, SYS, INFO, 102, Waiting for user names/passwords
WCCOActrl (3), 2018.06.20 10:01:50.404, SYS, INFO, 103, User names/passwords initialized
WCCOActrl (3), 2018.06.20 10:01:52.604, SYS, INFO, 181, Closing connection to (SYS: 1 Data -num 0 CONN: 1)
WCCILdata (0), 2018.06.20 10:01:52.604, SYS, INFO, 39, Connection lost, MAN: (SYS: 1 Ctrl -num 3 CONN: 1), Connection closed
WCCOActrl (3), 2018.06.20 10:01:52.620, SYS, INFO, 181, Closing connection to (SYS: 1 Event -num 0 CONN: 1)
WCCILevent (0), 2018.06.20 10:01:52.635, SYS, INFO, 39, Connection lost, MAN: (SYS: 1 Ctrl -num 3 CONN: 1), Connection closed
WCCOActrl (3), 2018.06.20 10:01:52.635, SYS, INFO, 39, Connection lost, MAN: (SYS: 1 Data -num 0 CONN: 1), Connection closed
WCCOActrl (3), 2018.06.20 10:01:52.666, SYS, INFO, 39, Connection lost, MAN: (SYS: 1 Event -num 0 CONN: 1), Connection closed
WCCOActrl (3), 2018.06.20 10:01:52.682, IMPL, SEVERE, 54, Unexpected state, some connections have been not closed ( 1) at:348 file:D:\\workspaces\\3.15\\workspace\\Exe\\CtrlExt\\CtrlADO\\DatabaseLayer\\ADOWrap.cxx
WCCOActrl (3), 2018.06.20 10:01:52.698, IMPL, SEVERE, 54, Unexpected state, some connections have been not closed ( 1) at:348 file:D:\\workspaces\\3.15\\workspace\\Exe\\CtrlExt\\CtrlADO\\DatabaseLayer\\ADOWrap.cxx