By: Sarah
Date: 2012-12-19
Time: 20:07
|
"No error detail available" - Very corrupt .docxAt least this new one sounds better than the "Catastrophic failure" I was getting yesterday ;)
I am transitioning my existing OpenTBS application from using groups acting as a canvas in Compatibility Mode in Word 2007 to <drawing>s in a non-Compatibility Mode Word 2010 .docx. I am running into trouble moving from changing the style attribute of my <v:imagedata> to the <a:ext> element of the <pic:pic> in the <drawing>. Here is what I have:
The value of LineItem.image.EMUs.width is int(7429500) and height is int(6057900) when I var_dump them. However, when I try to merge them as above, the TBS debug output is:
Interestingly, if I add zeroes before the merge tags like this:
My output changes to:
The output I am looking for is:
I have also tried this using the att=a:ext#cx like so:
And get the following:
...Which is really confusing. I have done a lot with these tags in the older style of xml and never had this issue. What am I doing wrong? Thank you for reading and for any help you can offer! |
|||||||
By: Skrol29
Date: 2012-12-20
Time: 01:31
|
Re: "No error detail available" - Very corrupt .docxHi Sarah,
The shift probably comes from another TBS field, such as a field for merging the picture. Do you have such a field? Can't you adjust the picture size using parameter "adjust" ? |
|||||||
By: Sarah
Date: 2012-12-20
Time: 18:20
|
Re: "No error detail available" - Very corrupt .docxYes, this is in the middle of a <pic:pic> block with a [LineItem.image.fullname;ope=changepic;default=current;noerr] that changes the picture out.
Thank you for telling me about adjust. I tried using it alone, with samewidth and with a percentage. The only real change I saw was with the percentage (adjust=30%), but my image was still stretched out and it just cut off at about 30% of the height (more like a crop than a scale). I think I need more control over the image size than just proportional scaling because I basically have about 20 images that might be put into the document (various accessories to the LineItem). These images are all different sizes and I was using a single image in the template with a block so it will make multiple images when there are multiple accessories (or none if there are no accessories). I set the height and width to be equal to the size of the image (determined with GD). I am using an object to hold the information about the image I want to switch in, so when TBS runs, I use a block. Is it necessary for me to have a second merge block call to insert the size and position of the image before the ope=changepic is run? My array of objects (accessories) holds Images like this:
To merge these, I use [LineItem_sub2.image.fullname;ope=changepic;default=current;noerr] Thank you for your response! |
|||||||
By: Skrol29
Date: 2012-12-21
Time: 00:28
|
Re: "No error detail available" - Very corrupt .docxIt is hard-coded that OpenTBS is operating a shift of TBS fields is some inner XML of the picture during the merging of pictures.
But there is a workaround: you just have to use 2 mergings instead of one. Let the parts:
But replace:
This could be optimize, but it should work. |
|||||||
By: Sarah
Date: 2012-12-22
Time: 00:50
|
Re: "No error detail available" - Very corrupt .docxThank you for the new snippet to try. I used the [onshow.data.[LineItem.$].image.fullname;ope=changepic;default=current;noerr] and it worked great once I changed my array keys to not use dots (probably a bad idea in the first place!). The issue I am encountering now is how to achieve the same effect with LineItem_sub2, which loops through the accessory items. I tried using [onshow.data.[LineItem_sub2.$].image.fullname;ope=changepic;default=current;noerr] but got the TBS error that '$' is not part of the LineItem_sub2 array. Am I just messing up my syntax here? I'm not totally clear on how _subs interact with $.
I really appreciate you taking the time to help me out with this. |
|||||||
By: Sarah
Date: 2012-12-26
Time: 20:17
|
Re: "No error detail available" - Very corrupt .docxI am also running into other problems with my subblock (sub2) now as I am referencing it in a couple of (non-adjacent) blocks in the template.
However, the two blocks are not adjacent in my template and TBS smashes them together when I have a block= reference for both places. This causes the document to fail to open because of mismatched tags. Is it possible to have one subblock print in two areas of the template? Thanks again for reading. |
|||||||
By: Skrol29
Date: 2012-12-28
Time: 02:39
|
Re: "No error detail available" - Very corrupt .docxHi Sarah,
> got the TBS error that '$' is not part of the LineItem_sub2 Make sure you have TBS 3.8.0. This message is probably probably because the block "LineItem_sub2" is not defined; i.e. it has no "block=" parameter. >However, the two blocks are not adjacent in my template and TBS smashes them > together when I have a block= reference for both places. This is the normal behavior for TBS. They are several logical reasons for this. Nevertheless, you can use the "p1" tip as described here: http://www.tinybutstrong.com/manual.php#php_mergeblock_mergesevera |
|||||||
By: Sarah
Date: 2012-12-31
Time: 20:08
|
Re: "No error detail available" - Very corrupt .docxOk, I believe I am understanding this better now (Not the p1 part, that still just seems like magic). I do have 3.8.0, and you were right about the lack of block= reference. 'p1' also worked like a charm. I am encountering a new problem, however. I will post a new topic since the subject no longer applies to my issue.
Thank you very much for your help! I am continually surprised by the little solutions OpenTBS offers that you always find after I have scoured the manual and feel there is nothing left I haven't read. |
|||||||
By: Bridget Brown
Date: 2013-03-09
Time: 10:18
|
Re: "No error detail available" - Very corrupt .docxIf corrupted .docx is the issue, then you may repair it by using Open and Repair of MS Office. You may also try to open the .docx file in OpenOffice-org Writer. If both these don't work or fail to open the file, then you may go for third=party recovery software. I recommend you to use SysInfoTools MS Word Docx Recovery or you may check its free demo version before buying it. It will fix your corrupted .docx file. I have it a couple of times.
http://www.sysinfotools.com/recovery/ms-word-docx-recovery.html Regards. |
|||||||
By: Skrol29
Date: 2013-03-11
Time: 22:53
|
Re: "No error detail available" - Very corrupt .docxHi Bridget
This is not relevant: if the template is not corrupted, then so must be the merged result. OpenTBS is reasonable of the corruption. |