Image not printing when using office.interop printout method - visual-studio-2010

I have a document with a image in the footer and an image in the main body.
My problem is the footer prints fine but the image in the main body doesnt. If I print from the document natively in Word it all prints OK but when i use
MsWord.ActiveDocument.PrintOut(Background:=False, Range:=Word.WdPrintOutRange.wdPrintAllDocument, Item:=Word.WdPrintOutItem.wdPrintDocumentContent, PageType:=Word.WdPrintOutPages.wdPrintAllPages)ied adding it as a watermark and that prints
It doesnt print the pic in the body.
Is there anything your aware of that would stop this.
FYI I tried adding it as a watermark and that worked, its just when its in the main body

Solved it by making it the watermark with lots of white space

Related

using img in html code. But how come the image does not show? but instead a little file shows

I'm using the mimo code app for coding. I saved a picture from google in the folder "Saved Pictures". The file name is "generic background". I did the code <="/Saved Pictures/generic background.jpg">. But the image does not show. Instead what shows is a small file. Don't really know how to get the image to show. I did used img src before =, but I need 10 reputations points to post an image even though I was just trying to show the code.

How can I get a "break" after an image

Using iTextSharp (4.1.6) in a Xamarin.Forms app.
I have lines of data with CRLF at the end of each. I put these into paragraphs, which I add to the doc. At then end of many, I add to the doc one or more images (photos). Works great.
Now, I'd like to have a page break after the last image, so I get a fresh start.
But iText seems to be flowing the text around the image some, and sometimes I don't get that page break, at last not where I want it. The next paragraph follows immediately after the image.
I tried adding a small paragraph after the image, but this did not solve. I did find that adding a SECTION seems to cause a good break, but puts some text in that I don't want or need.
I don't seem to find anything like API documentation for this, I've been just working from examples.
It seems like this would be really easy. What am I doing wrong?
iText seems to be flowing the text around the image some
Indeed, if you add an image to your document which does not fit on the current page anymore (but there still is some place for text on that page), iText does not immediately start a new page but keeps the image in memory and waits for your next content additions. If you then add text, that text first fills the current page, and only if even text does not fit anymore (or if you add another image), a new page is started and the waiting image is added.
You can switch this off using for your PdfWriter writer using
writer.StrictImageSequence = true;

Printing Images with ZPL code

I'm using ZDesigner to create my label and generate the zpl code. My label have several text boxes, a barcode, and a logo image.
I used the generated code on this webpage -> http://labelary.com/viewer.html, and the output was fine.
When I send the same zpl code to the printer (GC420D, installed as generic/text only) the logo image it's not printed.
ZDesigner uses the command ^GFA to send the image to the printer, I tried with diferent extensions (.pgn, .jpg and .bmp) and the results is always the same, no logo.
Any ideas why?
generated code:
^XA~TA000~JSN^LT0^MNW^MTD^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ
^XA
^MMT
^PW570
^LL0320
^LS0
^FO220,170^GFA,8000,0800,00020,:Z64:
eJztkjFugzAUhp+dICrUAUsQ1ogJsVXNASzV6dTBSH7KmiN4SMWKsvcOiAlxigw9QIdwnxooGFVl6FCpQ/7Blu3P7/2/ZYCb/pvIm2T37y9XLpk/bRbdUEEMiQUfpe88w+b4MLtcjMOd3XMA1oILIcnfmabnpvSg9GhTTHvuKtcbcty4OZ9z9cCV1h+RKiA8AGI5j5ZJSguT1nKuy/VuxXdAjjOuSJKOo7ZviBcZkEtA2svUNo2rnvOsv/BwQH1yQUczf55XlB2XThxRao9KOiCVM3LUcLRKht5jCpZH4auOiNaufZfaBKnTc5l4Iyfwim2LLX5ga9vWXnNOq6ZMm7FtdthFeZY/nXSkYVlrMRRV49oeUTrjmE/QjAy/MvjwswRBRGkL9jiNId7205De2JNhliECw6Hg9DTfxZX5eYYRBjbXhHU3Ouxdku5vMiY7h8gJLtlb9/mEMrn3xqjo2m5n5zTezuIxE4JlRnKhHHA7CaOlFHMRxpbc3XTTr/QJea9YBw==:F9E4^FS
^FT128,67^A0I,12,14^FH\^FDData de Emiss\C6o^FS
^FT128,129^A0I,12,16^FH\^FD#DOCUMENT#^FS
^FT76,103^A0I,12,16^FH\^FD#VAL#^FS
^FT100,49^A0I,12,16^FH\^FD#DE#^FS
^FT255,50^A0I,12,16^FH\^FD#CE#^FS
^FT408,46^A0I,12,16^FH\^FD#CC#^FS
^FT110,209^A0I,12,16^FH\^FD#Eur#^FS
^FT134,227^A0I,12,16^FH\^FDRecibo n\A7^FS
^FT124,101^A0I,12,16^FH\^FDEur^FS
^FT300,67^A0I,12,19^FH\^FDC\A2digo Entidade^FS
^FT434,67^A0I,14,16^FH\^FDC\A2digo Cliente^FS
^BY2,3,20^FT441,119^BCI,40,Y,N
^FD>;12345678>69^FS
^PQ1,0,1,Y^XZ
here is my answer a little late but it may be useful for someone. I had a problem when performing a print service for an android application, when pasting the zpl code into the text editor I was not noticing that for some reason some blank spaces were being added, I realized until I copied the code and I viewed it here http://labelary.com/viewer.html
after that I remove the blank spaces and the image could be displayed
zpl code with blank spaces

Maxscript renders saving blank/empty file

I am having trouble saving renders to an output file (using Maxscript). I use the following code in my script:
`render camera:$VRayCam002 frame:1 outputfile:"testscript.tif"`
When I run the code, I can see the scene render in the frame buffer, but the saved file, 'testscript.tif' is blank, i.e. the image is all black.
Any ideas what I may be doing wrong?
Thanks,
Figured out the problem. Apparently, while doing things pertaining to the render scene dialog settings in MAXScript, the actual dialog should be closed. See here from MAXScript help documentation.
With the dialog closed, the image saves properly
Also be sure to set
rendSaveFile =true and rendOutputFilename = "whatevername"

IText 2 + Flying Saucer: how to avoid that the images appears broken between two pdf's pages?

i have an html file and i'm using Itext 2 with flying Saucer to convert it to a pdf file.
The problem is that if an image starts near the page end, flying saucer render a portion of it it the end of the current page and the rest in the beginning of the next page.
How to say that i want the entire image on one page only?
You can add this to your print css:
img {
page-break-inside: avoid;
}
The user guide (PDF) mentions it.
There appears to be a bug in FlyingSaucer that is causing issues with page-break-inside: avoid.
The issue manifests when css: orphans kicks in, when a paragraph is laid out towards the end of a page and the minimum number of lines cannot be rendered on the page. Then the block box layout state machine appears to go wrong.
We have pushed a fix to a fork here: https://github.com/krokiet/flyingsaucer/tree/master
At some point we will raise a pull request to get this merged back into the main code base.
I have the same problem but
img {page-break-inside: avoid;}
is not the final solution. Yes it has impact for result and in some situations it works but not always.
Here is some more details about the same or similar problem.
Similar problem

Resources