PDF saving not working?

This is NOT a support forum. You are welcome to discuss software issues here, but all issues should be reported on Launchpad if you want them fixed.
felix
Posts: 3
Joined: Sat Feb 19, 2011 8:54 pm

PDF saving not working?

Postby felix » Sat Feb 19, 2011 9:39 pm

I am using Inkscape 0.48.0 r9654 on Windows 7 32 bit. I tried saving the attached svg as pdf. However, all I get is a blank pdf. I chose "convert text to path" and "export area as page". What should I check?
Attachments
poster_2.svg
(81.13 KiB) Downloaded 368 times

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: PDF saving not working?

Postby brynn » Sun Feb 20, 2011 10:03 am

Hi felix,
Welcome to InkscapeForum! Image

Well, my 1st and 2nd attempts crashed Inkscape. So there might be something funky in the file, although I couldn't say what. The file size seems fine though (large files sometimes cause Inkscape to crash for me). But on my 3rd attempt, I successfully Saved As PDF. However, I lost the gradient; the text is all black.

I know I've seen suggested in these forums, using another program to do the export. But since version 0.47 (I think) Inkscape has been capable of exporting gradients to PDF. So I'm not sure what the problem might be.

Unless you're in a hurry, I'd say let's wait a bit, for someone else who may find the problem. Although I did get the entire image as PDF, I'm flummoxed about the gradient. (Inkscape 0.48 stable, Win7 64-bit)

All best :D

Edit
Oh, I just noticed the font "Bohemian typewriter" which I've never heard of (and don't have installed). It's converted to Arial on my system, which might be why I was able to convert to PDF. It might be because it's an unusual font, that your conversion isn't working, because "unstable" fonts are known to cause problems for PDF. Although that would NOT explain my problem with the gradient....I don't think..... Hhhhm, I wonder if my system converting to Arial caused the loss of the gradient?? If so, then we solve both problems by using a more stable font.

Of course, converting the text to path would allow you to keep the look of the font AND eliminate the unstable font issue for the PDF. Can you try to convert the text to path in Inkscape before you Save As PDF? I have no idea if that might work better, than using the PDF dialog to convert text to path. But I think it's probably worth a try :D Maybe the unusual font got the PDF conversion off to such a bad start, that it couldn't convert the text to path, as well as if Inkscape did the conversion (text to path).

The other thing I've noticed is that your text, when I select it, is identified in the status/info area as "Linked flowed text". I'm not sure where the "linked" comes from, or if it could be the culprit. But I noticed it and thought I'd mention it. (I tried "uncloning" which clones ARE linked, but it says 'nothing to unlink'.)

I'm still investigating, so let me know if text to path in Inkscape works better than using the PDF dialog.

Edit #2
Also the small single black Asian character that lies beneath the large texted, gradiented character, near the top on the left, is an Asian language font, rather than a path. So it should probably be converted as well. I didn't check them all, but you can :mrgreen:
Last edited by brynn on Sun Feb 20, 2011 10:44 am, edited 3 times in total.
Reason: add more info

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: PDF saving not working?

Postby ~suv » Sun Feb 20, 2011 10:57 am

felix wrote:all I get is a blank pdf. I chose "convert text to path" and "export area as page".

Just curious - why do you convert the text to path?

If you want paths instead of text in the PDF file, try this:
  1. select the text and convert it to path using 'Path > Object to Path'
  2. ungroup the result
  3. save a copy as PDF, with normal settings
Works fine with Inkscape 0.48 r9654 on OS X 10.5.8, as well as with a current development build (r10057). Note that converting to path and ungrouping might take a minute or two (results in 9943 paths), and if saved as SVG, creates a file with 12.4 MB. The exported PDF file is 7.4 MB and displays fine in Apple's PDF viewer, as well as in evince and xpdf.


[Edit I] hmm, I only now looked up the font 'Bohemian typewriter' (obviously, I didn't have it installed), and I have my doubts that Inkscape will handle the conversion of this font well for such a large text (it will require tons of nodes to describe this font…). Also, the font doesn't fully validate on OS X. My previous tests had used the default fallback font. I'll report back later…[/Edit I]


[Edit II] successfully tested with the font 'Bohemian typewriter' installed and used for the text. Same as before, converted to path and ungrouped before saving a copy as PDF (the intermediary SVG file is 29.4 MB, and Inkscape slows down the rest of the system quite a bit (2 GM RAM)), export to PDF is ok (12.9 MB) and Apple's Preview.app displays the file correctly (though slow when zooming etc. due to file size and number of complex paths). [/Edit II]

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: PDF saving not working?

Postby ~suv » Sun Feb 20, 2011 11:56 am

brynn wrote:The other thing I've noticed is that your text, when I select it, is identified in the status/info area as "Linked flowed text". I'm not sure where the "linked" comes from, or if it could be the culprit.

'Linked flowed text' is what you get when you flow text into a frame or shape. With 'Shift+D' you can look up the 'frame' or 'shape' i.e. the path into which the text is flown (in this example, the path has no fill and no stroke to avoid it being visibly rendered. Switch to the node tool once you selected it with 'Shift+D' to see the outline).

felix
Posts: 3
Joined: Sat Feb 19, 2011 8:54 pm

Re: PDF saving not working?

Postby felix » Sun Feb 20, 2011 3:07 pm

Hi everyone, thank you for spending time on solving my problem. Here's what happened when I choose each option.
Leave it as text, check "convert text to path" in pdf convert, blank file saved.
Leave it as text, uncheck "convert text to path" in pdf convert, get a dialog "the file <filename> cannot be saved" immediately.
Convert text to path and ungroup, uncheck "convert text to path" in pdf convert, get a dialog "the file <filename> cannot be saved" .

Does it matter if I have PDFCreator and GhostScript installed on the same computer?

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: PDF saving not working?

Postby ~suv » Sun Feb 20, 2011 8:26 pm

felix wrote:Leave it as text, check "convert text to path" in pdf convert, blank file saved.
Did you verify this 'blank' file with different PDF viewers? What file size does the PDF have?
felix wrote:Does it matter if I have PDFCreator and GhostScript installed on the same computer?
Not as far as I know [1]: saving as PDF uses internal routines and the bundled cairo libs. Seems an issue with the Windows port of Inkscape [2] (possibly out-of-memory error in cairo, which doesn't report the error message back to Inkscape).

[1] PDFCreator AFAIK is only relevant if you print to a PDF file via the print dialog, Ghostscript is only used when importing Postscript-based files (PS and EPS are converted to PDF on-the-fly using ps2pdf from Ghostscript, and the temporary PDFs are then imported by internal routines), but not when saving/exporting.

[2] you could test a recent development snapshot (try R10017 which uses cairo 1.10.2, not the newer ones which IIRC have reverted to cairo 1.8.8 due to bug #707255)

felix
Posts: 3
Joined: Sat Feb 19, 2011 8:54 pm

Re: PDF saving not working?

Postby felix » Tue Feb 22, 2011 3:18 pm

The file size of the empty PDF file is 844 bytes.
I wanted it in PDF so I could move it to another computer and print it. Since I need to submit it soon, I gave up and saved it as a large PNG instead. thanks everyone.


Return to “Discuss Software Issues”