albrechtf / mcf2pdf

"My CEWE Photobook" MCF to PDF converter
Other
40 stars 37 forks source link

No album type definition found #1

Closed chris9x closed 8 years ago

chris9x commented 8 years ago

It is possible to fix this:

http://sourceforge.net/p/mcf2pdf/discussion/general/thread/6cb4e495/?limit=25#6ad4

Recognition of your work!

kind regards

archienorway commented 8 years ago

Still an issue with 0.2.1

5jr commented 8 years ago

I found the same issue. My test.mcf file contains productname="ALB17" One diificulty may be that the English version of the Cewe software (Photoworld) seems to be slightly different to the German version (Fotobuch). In both, the individual product .xml files are in a 'Products' folder inside 'Resources' but in Fotobuch there is a text file productuebersicht.txt that is missing in the Photoworld version. However, even converting this to photouebersicht.xml and putting it in the Resources folder together with a copy of ALB17.xml still creates No album type definition found for used print product 'ALB17' As the debug text shows, these files are checked but the program still cannot find what it needs. I am not knowledgable enough to dig into the script so would appreciate your help. Thanks Debug text follows: Microsoft Windows Version 10.0.10586 2015 Microsoft Corporation. All rights reserved. C:\Users\Matthew\mcf2pdf-0.2.1>mcf2pdf -d test.mcf output.pdf [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Checking XML file for product catalogue: C:\FOTOBUCH\Resources\addons.xml [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Checking XML file for product catalogue: C:\FOTOBUCH\Resources\ALB17.xml [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Checking XML file for product catalogue: C:\FOTOBUCH\Resources\appearance.xml [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Checking XML file for product catalogue: C:\FOTOBUCH\Resources\calendarentries.xml [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Checking XML file for product catalogue: C:\FOTOBUCH\Resources\calendar_layout.xml [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Checking XML file for product catalogue: C:\FOTOBUCH\Resources\calendar_schema.xml [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Checking XML file for product catalogue: C:\FOTOBUCH\Resources\calendar_synonym.xml [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Checking XML file for product catalogue: C:\FOTOBUCH\Resources\colors.xml [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Checking XML file for product catalogue: C:\FOTOBUCH\Resources\crossselling.xml [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Checking XML file for product catalogue: C:\FOTOBUCH\Resources\currencies.xml [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Checking XML file for product catalogue: C:\FOTOBUCH\Resources\customer.xml [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Checking XML file for product catalogue: C:\FOTOBUCH\Resources\CWFotoImportConfig.xml [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Checking XML file for product catalogue: C:\FOTOBUCH\Resources\default.xml [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Checking XML file for product catalogue: C:\FOTOBUCH\Resources\fonts-mac.xml [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Checking XML file for product catalogue: C:\FOTOBUCH\Resources\fonts-win.xml [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Checking XML file for product catalogue: C:\FOTOBUCH\Resources\fonts-x11.xml [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Checking XML file for product catalogue: C:\FOTOBUCH\Resources\fotili.xml [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Checking XML file for product catalogue: C:\FOTOBUCH\Resources\hompepage_products.xml [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Checking XML file for product catalogue: C:\FOTOBUCH\Resources\hps_sitemap.xml [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Checking XML file for product catalogue: C:\FOTOBUCH\Resources\locr.xml [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Checking XML file for product catalogue: C:\FOTOBUCH\Resources\moonphases.xml [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Checking XML file for product catalogue: C:\FOTOBUCH\Resources\orderingdetails-16523-2.3.xml [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Checking XML file for product catalogue: C:\FOTOBUCH\Resources\photofun.xml [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Checking XML file for product catalogue: C:\FOTOBUCH\Resources\pricelist-16523-2.3.xml [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Checking XML file for product catalogue: C:\FOTOBUCH\Resources\productuebersicht.xml [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Checking XML file for product catalogue: C:\FOTOBUCH\Resources\resources-16523-2.3.xml [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Checking XML file for product catalogue: C:\FOTOBUCH\Resources\services.xml [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Checking XML file for product catalogue: C:\FOTOBUCH\Resources\startscreen.xml [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Checking XML file for product catalogue: C:\FOTOBUCH\Resources\terms-16523-2.3.xml [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Checking XML file for product catalogue: C:\FOTOBUCH\Resources\version.xml [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Checking XML file for product catalogue: C:\FOTOBUCH\Resources\xtci_servers.xml [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Searching for MCF resources in [C:\FOTOBUCH\Resources, C:\ProgramData\tmp, C:\ProgramData\hps] [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Reading MCF file [ERROR] net.sf.mcf2pdf.Main An exception has occured java.io.IOException: No album type definition found for used print product 'ALB17' at net.sf.mcf2pdf.Mcf2FoConverter.convert(Mcf2FoConverter.java:183) at net.sf.mcf2pdf.Main.main(Main.java:181)

C:\Users\Matthew\mcf2pdf-0.2.1>

albrechtf commented 8 years ago

@5jr Thank you for the Debug output! As you analyzed correctly, the ALB17.xml is found and scanned by the program, so I wonder why the album type is not recognized. Could you please attach your ALB17.xml as well? Thanks!

The productuebersicht is not used at all, as far as I remember. The software only scans for all XML files in these folders and detect their type by their content.

5jr commented 8 years ago

Thanks for your quick response. I have attached the ALB17.xml file and my TEST.mcf file. GitHub would not accept either format so they are saved as .docx. Sorry for the productuebersicht diversion. Since the debug output said it was Checking XML file for product catalogue I wondered if there was a catalogue file missing and that could have been it. By the way, the program seems not to find all the .xmls in the Resources subfolder Products (which is why I made a copy of ALB17.xml to the parent folder.

I hope it's simple! Thanks Matthew

ALB17.docx Test.docx

ebkraus commented 8 years ago

I had the same issue with my mcf-file, so i downloaded the sourcecode and fixed two problems: a) changed the folder where the XML-files are stored from Resources to Resources/products b) adjusted the keywords of the XML-Reader to the new file structure. With these modifications i was able to generate a pdf-file of my photobook. The zip-file here contains the changed Java-files and the modified jar-file.

mcf2pdf-0.2.1_modified.zip

Many thanks to the author of the program!

5jr commented 8 years ago

That's great, thank you! I could get mcf2pdf to run generate a pdf now. This is a great step and I would like to thank the original author and the modifier. I have found mcf2pdf zooms some of the images by 4x or more within the original frame (it seems ones I have scanned rather than shot) but I need to investigate further. If I find an issue I will start a new thread. Does anyone else have this experience?

My other concern is a warning near the end of the conversion: Warning: Could not get charToByteConverterClass! Is this relevant to anything? The context is shown below. I have Java 8 Update 66. Thanks for your advice.

[DEBUG] net.sf.mcf2pdf.pagebuild.PageBinding Rendering page binding [DEBUG] net.sf.mcf2pdf.Mcf2FoConverter Creating XSL-FO data [DEBUG] net.sf.mcf2pdf.Main Converting XSL-FO data to PDF [DEBUG] org.apache.fop.apps.FOUserAgent target-resolution set to: 72.0dpi (px2mm=0.35277778) [DEBUG] org.apache.fop.apps.FOUserAgent target-resolution set to: 300.0dpi (px2mm=0.08466666) Warning: Could not get charToByteConverterClass! [DEBUG] net.sf.mcf2pdf.mcfelements.util.PdfUtil PageSequence cover generated 1 pages. [DEBUG] net.sf.mcf2pdf.mcfelements.util.PdfUtil PageSequence default generated 62 pages. [INFO ] net.sf.mcf2pdf.mcfelements.util.PdfUtil Generated 63 PDF pages in total. C:\Users\Matthew\mcf2pdf-0.2.1>

ebkraus commented 8 years ago

I also had two pictures with a wrong scaling in the pdf-file. I found that these pictures had a resolution information given in the EXIF data, whereas the other pictures had none. I changed the source code to ignore the resolution information, which helps in my case.

mcf2pdf-0.2.1_modified2.zip

albrechtf commented 8 years ago

@ebkraus Thanks a lot for your efforts! The resolution thing is a known problem, and I still haven't figured out how the CEWE software determines how to scale the images. For photos, the resolution is stored in EXIF metadata and thus scaling for printing / PDF can easily be calculated. For other images, I have no clue what they assume as resolution. I tried 72 dpi, which works for some images, but not for others...

I am not sure how familiar you are with GitHub. Best would be if you forked mcf2pdf into your GitHub account and apply your modifications there. Then, you could create one or two Pull Requests, so I could easily review and merge your changes.

As it seems that CEWE have changed their installation and file structure, I will have to support both old and new versions of the software. Slight adjustments will be necessary to check file versions etc.

5jr commented 8 years ago

@ebkraus Thank you, that worked for me as well.

chris9x commented 8 years ago

Thanks a lot to ebkraus and all other Contributors to fix this issue!!! I have to use the version mcf2pdf-0.2.1_modified2.zip to fix scaling issue. kind regards

krausu commented 8 years ago

Hi all,

Thanks for that great tool. After the modifications from ebkraus and also in the bat file ( adding the pngj.jar ) it works wonderfull.

kind regards Uwe

zicomp commented 8 years ago

I'm so close to make it work... but... so I had the same problem mentioned above, and now, with "modified" and "modified2" it starts working, but then aborts and says: "Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at java.awt.image.DataBufferInt." (and quite some more similar lines). Any idea what I could do? It's not a question of HD space, that's for sure - and memory, well, how much could it want?? zicomp

albrechtf commented 8 years ago

I close this issue for now; the contributed fixes have been included in release 0.3.0.

@zicomp: Please read the README.md for information on how to fix this (at the end of the file, "Troubleshooting").