Opened 17 years ago
Closed 13 years ago
#2337 closed defect (fixed)
PDF Format - msDrawQueryMap(): Unable to initialize image
Reported by: | tmelhuish | Owned by: | mapserverbugs |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Output-PDF | Version: | 4.10 |
Severity: | normal | Keywords: | pdf drawQuerymap |
Cc: |
Description
I receive the following error message when trying to create a PDF file using the PDF Format and drawQueryMap in PHP:
msDrawQueryMap(): Unable to initialize image
I'm using: Mapserver 4.10.3 GD 2.0.35 PdfLib-lite 7.0.1
Attached is a test php script and a mapfile to recreate the problem.
The output format for PNG works fine but PDF fails. If I use drawMap versus drawQuerymap is works fine as well.
I looked at bug fix 2017, but was not sure if this would fix my problem. I see for some reason that this didn't make it into the 4.10.3 release.
Thanks in advance for your help, Tom
Attachments (2)
Change History (5)
by , 17 years ago
Attachment: | pdftest.php added |
---|
by , 17 years ago
Mapfile to show format options. You need to copy in your own layer data
comment:1 by , 17 years ago
I added the following lines of code before the "Unable to initialize image" error message in the mapdraw.c code. I also removed the FORMATOPTION "OUTPUT_TYPE=RASTER" in the mapfile which seam to fix the problem. Why was this removed in the mapserver 4.10.3 code that I am using?
#ifdef USE_PDF
else if( MS_RENDERER_PDF(map->outputformat) ) {
image = msImageCreatePDF(map->width, map->height, map->outputformat,
map->web.imagepath, map->web.imageurl, map);
}
#endif
comment:2 by , 17 years ago
Component: | MapServer C Library → Output-PDF |
---|---|
Owner: | changed from | to
comment:3 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
probably invalid since the 6.0 pdf rewrite. reopen if necessary.
Pdf test script to change format & draw options